Skip to content

Commit

Permalink
tty/vt: Remove printable variable
Browse files Browse the repository at this point in the history
Every since the 0.99.7A release when console_register() was introduced
it's become impossible to call vt_console_print (called
console_print() back then still) directly. Which means the
initialization issue this variable protected against is no more.

Give it a send off with style and let it rest in peace.

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: "Ilpo Järvinen" <[email protected]>
Cc: nick black <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Cc: Yangxi Xiang <[email protected]>
Cc: Xuezhi Zhang <[email protected]>
Reviewed-by: Jiri Slaby <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
danvet authored and gregkh committed Aug 30, 2022
1 parent 8b470f6 commit f26fd92
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/tty/vt/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ static void set_palette(struct vc_data *vc);

#define vt_get_kmsg_redirect() vt_kmsg_redirect(-1)

static int printable; /* Is console ready for printing? */
int default_utf8 = true;
module_param(default_utf8, int, S_IRUGO | S_IWUSR);
int global_cursor_default = -1;
Expand Down Expand Up @@ -3085,8 +3084,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
int kmsg_console;

/* console busy or not yet initialized */
if (!printable)
return;
if (!spin_trylock(&printing_lock))
return;

Expand Down Expand Up @@ -3537,7 +3534,6 @@ static int __init con_init(void)
pr_info("Console: %s %s %dx%d\n",
vc->vc_can_do_color ? "colour" : "mono",
display_desc, vc->vc_cols, vc->vc_rows);
printable = 1;

console_unlock();

Expand Down

0 comments on commit f26fd92

Please sign in to comment.