Lines Matching refs:newcon

3267 static int try_enable_preferred_console(struct console *newcon,  in try_enable_preferred_console()  argument
3278 if (!newcon->match || in try_enable_preferred_console()
3279 newcon->match(newcon, c->name, c->index, c->options) != 0) { in try_enable_preferred_console()
3281 BUILD_BUG_ON(sizeof(c->name) != sizeof(newcon->name)); in try_enable_preferred_console()
3282 if (strcmp(c->name, newcon->name) != 0) in try_enable_preferred_console()
3284 if (newcon->index >= 0 && in try_enable_preferred_console()
3285 newcon->index != c->index) in try_enable_preferred_console()
3287 if (newcon->index < 0) in try_enable_preferred_console()
3288 newcon->index = c->index; in try_enable_preferred_console()
3290 if (_braille_register_console(newcon, c)) in try_enable_preferred_console()
3293 if (newcon->setup && in try_enable_preferred_console()
3294 (err = newcon->setup(newcon, c->options)) != 0) in try_enable_preferred_console()
3297 newcon->flags |= CON_ENABLED; in try_enable_preferred_console()
3299 newcon->flags |= CON_CONSDEV; in try_enable_preferred_console()
3308 if (newcon->flags & CON_ENABLED && c->user_specified == user_specified) in try_enable_preferred_console()
3315 static void try_enable_default_console(struct console *newcon) in try_enable_default_console() argument
3317 if (newcon->index < 0) in try_enable_default_console()
3318 newcon->index = 0; in try_enable_default_console()
3320 if (newcon->setup && newcon->setup(newcon, NULL) != 0) in try_enable_default_console()
3323 newcon->flags |= CON_ENABLED; in try_enable_default_console()
3325 if (newcon->device) in try_enable_default_console()
3326 newcon->flags |= CON_CONSDEV; in try_enable_default_console()
3334 static void console_init_seq(struct console *newcon, bool bootcon_registered) in console_init_seq() argument
3339 if (newcon->flags & (CON_PRINTBUFFER | CON_BOOT)) { in console_init_seq()
3342 newcon->seq = syslog_seq; in console_init_seq()
3346 newcon->seq = prb_next_seq(prb); in console_init_seq()
3367 if (!console_flush_all(true, &newcon->seq, &handover)) { in console_init_seq()
3380 newcon->seq = prb_next_seq(prb); in console_init_seq()
3384 con->seq < newcon->seq) { in console_init_seq()
3385 newcon->seq = con->seq; in console_init_seq()
3419 void register_console(struct console *newcon) in register_console() argument
3429 if (WARN(con == newcon, "console '%s%d' already registered\n", in register_console()
3441 if ((newcon->flags & CON_BOOT) && realcon_registered) { in register_console()
3443 newcon->name, newcon->index); in register_console()
3462 try_enable_default_console(newcon); in register_console()
3467 err = try_enable_preferred_console(newcon, true); in register_console()
3471 err = try_enable_preferred_console(newcon, false); in register_console()
3474 if (err || newcon->flags & CON_BRL) in register_console()
3484 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV)) { in register_console()
3485 newcon->flags &= ~CON_PRINTBUFFER; in register_console()
3488 newcon->dropped = 0; in register_console()
3489 console_init_seq(newcon, bootcon_registered); in register_console()
3497 newcon->flags |= CON_CONSDEV; in register_console()
3498 hlist_add_head_rcu(&newcon->node, &console_list); in register_console()
3500 } else if (newcon->flags & CON_CONSDEV) { in register_console()
3503 hlist_add_head_rcu(&newcon->node, &console_list); in register_console()
3506 hlist_add_behind_rcu(&newcon->node, console_list.first); in register_console()
3524 con_printk(KERN_INFO, newcon, "enabled\n"); in register_console()
3526 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) && in register_console()