Lines Matching refs:newcon

3790 static int console_call_setup(struct console *newcon, char *options)  in console_call_setup()  argument
3794 if (!newcon->setup) in console_call_setup()
3799 err = newcon->setup(newcon, options); in console_call_setup()
3814 static int try_enable_preferred_console(struct console *newcon, in try_enable_preferred_console() argument
3828 if (!newcon->match || in try_enable_preferred_console()
3829 newcon->match(newcon, c->name, c->index, c->options) != 0) { in try_enable_preferred_console()
3831 BUILD_BUG_ON(sizeof(c->name) != sizeof(newcon->name)); in try_enable_preferred_console()
3832 if (strcmp(c->name, newcon->name) != 0) in try_enable_preferred_console()
3834 if (newcon->index >= 0 && in try_enable_preferred_console()
3835 newcon->index != c->index) in try_enable_preferred_console()
3837 if (newcon->index < 0) in try_enable_preferred_console()
3838 newcon->index = c->index; in try_enable_preferred_console()
3840 if (_braille_register_console(newcon, c)) in try_enable_preferred_console()
3843 err = console_call_setup(newcon, c->options); in try_enable_preferred_console()
3847 newcon->flags |= CON_ENABLED; in try_enable_preferred_console()
3849 newcon->flags |= CON_CONSDEV; in try_enable_preferred_console()
3858 if (newcon->flags & CON_ENABLED && c->user_specified == user_specified) in try_enable_preferred_console()
3865 static void try_enable_default_console(struct console *newcon) in try_enable_default_console() argument
3867 if (newcon->index < 0) in try_enable_default_console()
3868 newcon->index = 0; in try_enable_default_console()
3870 if (console_call_setup(newcon, NULL) != 0) in try_enable_default_console()
3873 newcon->flags |= CON_ENABLED; in try_enable_default_console()
3875 if (newcon->device) in try_enable_default_console()
3876 newcon->flags |= CON_CONSDEV; in try_enable_default_console()
3880 static u64 get_init_console_seq(struct console *newcon, bool bootcon_registered) in get_init_console_seq() argument
3886 if (newcon->flags & (CON_PRINTBUFFER | CON_BOOT)) { in get_init_console_seq()
3977 void register_console(struct console *newcon) in register_console() argument
3979 bool use_device_lock = (newcon->flags & CON_NBCON) && newcon->write_atomic; in register_console()
3990 if (WARN(con == newcon, "console '%s%d' already registered\n", in register_console()
4002 if ((newcon->flags & CON_BOOT) && realcon_registered) { in register_console()
4004 newcon->name, newcon->index); in register_console()
4008 if (newcon->flags & CON_NBCON) { in register_console()
4013 if (!nbcon_alloc(newcon)) in register_console()
4032 try_enable_default_console(newcon); in register_console()
4037 err = try_enable_preferred_console(newcon, true); in register_console()
4041 err = try_enable_preferred_console(newcon, false); in register_console()
4044 if (err || newcon->flags & CON_BRL) { in register_console()
4045 if (newcon->flags & CON_NBCON) in register_console()
4046 nbcon_free(newcon); in register_console()
4057 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV)) { in register_console()
4058 newcon->flags &= ~CON_PRINTBUFFER; in register_console()
4061 newcon->dropped = 0; in register_console()
4062 init_seq = get_init_console_seq(newcon, bootcon_registered); in register_console()
4064 if (newcon->flags & CON_NBCON) { in register_console()
4066 nbcon_seq_force(newcon, init_seq); in register_console()
4069 newcon->seq = init_seq; in register_console()
4072 if (newcon->flags & CON_BOOT) in register_console()
4086 newcon->device_lock(newcon, &flags); in register_console()
4094 newcon->flags |= CON_CONSDEV; in register_console()
4095 hlist_add_head_rcu(&newcon->node, &console_list); in register_console()
4097 } else if (newcon->flags & CON_CONSDEV) { in register_console()
4100 hlist_add_head_rcu(&newcon->node, &console_list); in register_console()
4103 hlist_add_behind_rcu(&newcon->node, console_list.first); in register_console()
4114 newcon->device_unlock(newcon, flags); in register_console()
4125 con_printk(KERN_INFO, newcon, "enabled\n"); in register_console()
4127 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) && in register_console()