Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

printk: add console_cmdline.h

Add an include file for the console_cmdline struct so that the braille
console driver can be separated.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Joe Perches and committed by
Linus Torvalds
d197c43d b9ee979e

+17 -9
+14
kernel/printk/console_cmdline.h
··· 1 + #ifndef _CONSOLE_CMDLINE_H 2 + #define _CONSOLE_CMDLINE_H 3 + 4 + struct console_cmdline 5 + { 6 + char name[8]; /* Name of the driver */ 7 + int index; /* Minor dev. to use */ 8 + char *options; /* Options for the driver */ 9 + #ifdef CONFIG_A11Y_BRAILLE_CONSOLE 10 + char *brl_options; /* Options for braille driver */ 11 + #endif 12 + }; 13 + 14 + #endif
+3 -9
kernel/printk/printk.c
··· 51 51 #define CREATE_TRACE_POINTS 52 52 #include <trace/events/printk.h> 53 53 54 + #include "console_cmdline.h" 55 + 54 56 /* printk's without a loglevel use this.. */ 55 57 #define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL 56 58 ··· 107 105 /* 108 106 * Array of consoles built from command line options (console=) 109 107 */ 110 - struct console_cmdline 111 - { 112 - char name[8]; /* Name of the driver */ 113 - int index; /* Minor dev. to use */ 114 - char *options; /* Options for the driver */ 115 - #ifdef CONFIG_A11Y_BRAILLE_CONSOLE 116 - char *brl_options; /* Options for braille driver */ 117 - #endif 118 - }; 119 108 120 109 #define MAX_CMDLINECONSOLES 8 121 110 122 111 static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES]; 112 + 123 113 static int selected_console = -1; 124 114 static int preferred_console = -1; 125 115 int console_set_on_cmdline;