diff options
author | Jiri Slaby <jslaby@suse.cz> | 2010-11-04 11:20:20 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-16 15:50:17 -0500 |
commit | a75d946f42ae1771424a9582129fc5182ff48a1b (patch) | |
tree | 118c2d23427c507a29bd46b6a046035d62005ecb /include/linux/console.h | |
parent | 2adc2917ce4bfb482a6e3c05ff543cef151c9830 (diff) |
console: move for_each_console to linux/console.h
Move it out of printk.c so that we can use it all over the code. There
are some potential users which will be converted to that macro in next
patches.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/console.h')
-rw-r--r-- | include/linux/console.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/console.h b/include/linux/console.h index 95cf6f08a59d..875cfb1c8132 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -126,6 +126,12 @@ struct console { | |||
126 | struct console *next; | 126 | struct console *next; |
127 | }; | 127 | }; |
128 | 128 | ||
129 | /* | ||
130 | * for_each_console() allows you to iterate on each console | ||
131 | */ | ||
132 | #define for_each_console(con) \ | ||
133 | for (con = console_drivers; con != NULL; con = con->next) | ||
134 | |||
129 | extern int console_set_on_cmdline; | 135 | extern int console_set_on_cmdline; |
130 | 136 | ||
131 | extern int add_preferred_console(char *name, int idx, char *options); | 137 | extern int add_preferred_console(char *name, int idx, char *options); |