Skip to content

Commit

Permalink
console: move for_each_console to linux/console.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Nov 16, 2010
1 parent 2adc291 commit a75d946
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions include/linux/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ struct console {
struct console *next;
};

/*
* for_each_console() allows you to iterate on each console
*/
#define for_each_console(con) \
for (con = console_drivers; con != NULL; con = con->next)

extern int console_set_on_cmdline;

extern int add_preferred_console(char *name, int idx, char *options);
Expand Down
6 changes: 0 additions & 6 deletions kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@

#include <asm/uaccess.h>

/*
* for_each_console() allows you to iterate on each console
*/
#define for_each_console(con) \
for (con = console_drivers; con != NULL; con = con->next)

/*
* Architectures can override it:
*/
Expand Down

0 comments on commit a75d946

Please sign in to comment.