Lines Matching refs:newcon
3017 static int try_enable_preferred_console(struct console *newcon, in try_enable_preferred_console() argument
3028 if (!newcon->match || in try_enable_preferred_console()
3029 newcon->match(newcon, c->name, c->index, c->options) != 0) { in try_enable_preferred_console()
3031 BUILD_BUG_ON(sizeof(c->name) != sizeof(newcon->name)); in try_enable_preferred_console()
3032 if (strcmp(c->name, newcon->name) != 0) in try_enable_preferred_console()
3034 if (newcon->index >= 0 && in try_enable_preferred_console()
3035 newcon->index != c->index) in try_enable_preferred_console()
3037 if (newcon->index < 0) in try_enable_preferred_console()
3038 newcon->index = c->index; in try_enable_preferred_console()
3040 if (_braille_register_console(newcon, c)) in try_enable_preferred_console()
3043 if (newcon->setup && in try_enable_preferred_console()
3044 (err = newcon->setup(newcon, c->options)) != 0) in try_enable_preferred_console()
3047 newcon->flags |= CON_ENABLED; in try_enable_preferred_console()
3049 newcon->flags |= CON_CONSDEV; in try_enable_preferred_console()
3058 if (newcon->flags & CON_ENABLED && c->user_specified == user_specified) in try_enable_preferred_console()
3065 static void try_enable_default_console(struct console *newcon) in try_enable_default_console() argument
3067 if (newcon->index < 0) in try_enable_default_console()
3068 newcon->index = 0; in try_enable_default_console()
3070 if (newcon->setup && newcon->setup(newcon, NULL) != 0) in try_enable_default_console()
3073 newcon->flags |= CON_ENABLED; in try_enable_default_console()
3075 if (newcon->device) in try_enable_default_console()
3076 newcon->flags |= CON_CONSDEV; in try_enable_default_console()
3103 void register_console(struct console *newcon) in register_console() argument
3111 if (WARN(con == newcon, "console '%s%d' already registered\n", in register_console()
3124 if (newcon->flags & CON_BOOT && realcon_enabled) { in register_console()
3126 newcon->name, newcon->index); in register_console()
3145 try_enable_default_console(newcon); in register_console()
3150 err = try_enable_preferred_console(newcon, true); in register_console()
3154 err = try_enable_preferred_console(newcon, false); in register_console()
3157 if (err || newcon->flags & CON_BRL) in register_console()
3167 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV)) { in register_console()
3168 newcon->flags &= ~CON_PRINTBUFFER; in register_console()
3176 if ((newcon->flags & CON_CONSDEV) || console_drivers == NULL) { in register_console()
3177 newcon->next = console_drivers; in register_console()
3178 console_drivers = newcon; in register_console()
3179 if (newcon->next) in register_console()
3180 newcon->next->flags &= ~CON_CONSDEV; in register_console()
3182 newcon->flags |= CON_CONSDEV; in register_console()
3184 newcon->next = console_drivers->next; in register_console()
3185 console_drivers->next = newcon; in register_console()
3188 newcon->dropped = 0; in register_console()
3189 if (newcon->flags & CON_PRINTBUFFER) { in register_console()
3192 newcon->seq = syslog_seq; in register_console()
3196 newcon->seq = prb_next_seq(prb); in register_console()
3208 con_printk(KERN_INFO, newcon, "enabled\n"); in register_console()
3210 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) && in register_console()