Lines Matching full:newcon

3880 static int console_call_setup(struct console *newcon, char *options)  in console_call_setup()  argument
3884 if (!newcon->setup) in console_call_setup()
3889 err = newcon->setup(newcon, options); in console_call_setup()
3901 static int try_enable_preferred_console(struct console *newcon, in try_enable_preferred_console() argument
3915 if (!newcon->match || in try_enable_preferred_console()
3916 newcon->match(newcon, c->name, c->index, c->options) != 0) { in try_enable_preferred_console()
3918 BUILD_BUG_ON(sizeof(c->name) != sizeof(newcon->name)); in try_enable_preferred_console()
3919 if (strcmp(c->name, newcon->name) != 0) in try_enable_preferred_console()
3921 if (newcon->index >= 0 && in try_enable_preferred_console()
3922 newcon->index != c->index) in try_enable_preferred_console()
3924 if (newcon->index < 0) in try_enable_preferred_console()
3925 newcon->index = c->index; in try_enable_preferred_console()
3927 if (_braille_register_console(newcon, c)) in try_enable_preferred_console()
3930 err = console_call_setup(newcon, c->options); in try_enable_preferred_console()
3934 newcon->flags |= CON_ENABLED; in try_enable_preferred_console()
3936 newcon->flags |= CON_CONSDEV; in try_enable_preferred_console()
3944 static void try_enable_default_console(struct console *newcon) in try_enable_default_console() argument
3946 if (newcon->index < 0) in try_enable_default_console()
3947 newcon->index = 0; in try_enable_default_console()
3949 if (console_call_setup(newcon, NULL) != 0) in try_enable_default_console()
3952 newcon->flags |= CON_ENABLED; in try_enable_default_console()
3954 if (newcon->device) in try_enable_default_console()
3955 newcon->flags |= CON_CONSDEV; in try_enable_default_console()
3959 static u64 get_init_console_seq(struct console *newcon, bool bootcon_registered) in get_init_console_seq() argument
3965 if (newcon->flags & (CON_PRINTBUFFER | CON_BOOT)) { in get_init_console_seq()
3977 * device as @newcon. Since it is not known which boot console in get_init_console_seq()
4056 void register_console(struct console *newcon) in register_console() argument
4058 bool use_device_lock = (newcon->flags & CON_NBCON) && newcon->write_atomic; in register_console()
4069 if (WARN(con == newcon, "console '%s%d' already registered\n", in register_console()
4081 if ((newcon->flags & CON_BOOT) && realcon_registered) { in register_console()
4083 newcon->name, newcon->index); in register_console()
4087 if (newcon->flags & CON_NBCON) { in register_console()
4092 if (!nbcon_alloc(newcon)) in register_console()
4111 try_enable_default_console(newcon); in register_console()
4116 err = try_enable_preferred_console(newcon, true); in register_console()
4120 err = try_enable_preferred_console(newcon, false); in register_console()
4127 if (err == -ENOENT && (newcon->flags & CON_ENABLED)) in register_console()
4131 if (err || newcon->flags & CON_BRL) { in register_console()
4132 if (newcon->flags & CON_NBCON) in register_console()
4133 nbcon_free(newcon); in register_console()
4144 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV)) { in register_console()
4145 newcon->flags &= ~CON_PRINTBUFFER; in register_console()
4148 newcon->dropped = 0; in register_console()
4149 init_seq = get_init_console_seq(newcon, bootcon_registered); in register_console()
4151 if (newcon->flags & CON_NBCON) { in register_console()
4153 nbcon_seq_force(newcon, init_seq); in register_console()
4156 newcon->seq = init_seq; in register_console()
4159 if (newcon->flags & CON_BOOT) in register_console()
4173 newcon->device_lock(newcon, &flags); in register_console()
4181 newcon->flags |= CON_CONSDEV; in register_console()
4182 hlist_add_head_rcu(&newcon->node, &console_list); in register_console()
4184 } else if (newcon->flags & CON_CONSDEV) { in register_console()
4187 hlist_add_head_rcu(&newcon->node, &console_list); in register_console()
4190 hlist_add_behind_rcu(&newcon->node, console_list.first); in register_console()
4201 newcon->device_unlock(newcon, flags); in register_console()
4212 con_printk(KERN_INFO, newcon, "enabled\n"); in register_console()
4214 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) && in register_console()