diff options
| author | Joe Perches <joe@perches.com> | 2013-07-31 16:53:44 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-31 17:41:03 -0400 |
| commit | d197c43d04decb6b1298fa3ef26ea04a9ca7c977 (patch) | |
| tree | a5c773cedfb728bd8bf75c76f4e0edbc931eb2b7 /kernel | |
| parent | b9ee979e9d770dc10f94936ef6ff9efddc23c911 (diff) | |
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>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/printk/console_cmdline.h | 14 | ||||
| -rw-r--r-- | kernel/printk/printk.c | 12 |
2 files changed, 17 insertions, 9 deletions
diff --git a/kernel/printk/console_cmdline.h b/kernel/printk/console_cmdline.h new file mode 100644 index 000000000000..cbd69d842341 --- /dev/null +++ b/kernel/printk/console_cmdline.h | |||
| @@ -0,0 +1,14 @@ | |||
| 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 | ||
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 69b0890ed7e5..4da2b2c7f67d 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c | |||
| @@ -51,6 +51,8 @@ | |||
| 51 | #define CREATE_TRACE_POINTS | 51 | #define CREATE_TRACE_POINTS |
| 52 | #include <trace/events/printk.h> | 52 | #include <trace/events/printk.h> |
| 53 | 53 | ||
| 54 | #include "console_cmdline.h" | ||
| 55 | |||
| 54 | /* printk's without a loglevel use this.. */ | 56 | /* printk's without a loglevel use this.. */ |
| 55 | #define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL | 57 | #define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL |
| 56 | 58 | ||
| @@ -105,19 +107,11 @@ static struct console *exclusive_console; | |||
| 105 | /* | 107 | /* |
| 106 | * Array of consoles built from command line options (console=) | 108 | * Array of consoles built from command line options (console=) |
| 107 | */ | 109 | */ |
| 108 | struct console_cmdline | ||
| 109 | { | ||
| 110 | char name[8]; /* Name of the driver */ | ||
| 111 | int index; /* Minor dev. to use */ | ||
| 112 | char *options; /* Options for the driver */ | ||
| 113 | #ifdef CONFIG_A11Y_BRAILLE_CONSOLE | ||
| 114 | char *brl_options; /* Options for braille driver */ | ||
| 115 | #endif | ||
| 116 | }; | ||
| 117 | 110 | ||
| 118 | #define MAX_CMDLINECONSOLES 8 | 111 | #define MAX_CMDLINECONSOLES 8 |
| 119 | 112 | ||
| 120 | static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES]; | 113 | static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES]; |
| 114 | |||
| 121 | static int selected_console = -1; | 115 | static int selected_console = -1; |
| 122 | static int preferred_console = -1; | 116 | static int preferred_console = -1; |
| 123 | int console_set_on_cmdline; | 117 | int console_set_on_cmdline; |
