um: Don't use console_drivers directly
console_drivers is kind of (semi-)private variable to the console code. Direct use of it make us stuck with it being exported here and there. Reduce use of console_drivers by replacing it with for_each_console(). Cc: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
b495dfed70
commit
7d7c056828
@ -9,20 +9,19 @@ static void kmsg_dumper_stdout(struct kmsg_dumper *dumper,
|
||||
enum kmsg_dump_reason reason)
|
||||
{
|
||||
static char line[1024];
|
||||
|
||||
struct console *con;
|
||||
size_t len = 0;
|
||||
bool con_available = false;
|
||||
|
||||
/* only dump kmsg when no console is available */
|
||||
if (!console_trylock())
|
||||
return;
|
||||
|
||||
if (console_drivers != NULL)
|
||||
con_available = true;
|
||||
for_each_console(con)
|
||||
break;
|
||||
|
||||
console_unlock();
|
||||
|
||||
if (con_available == true)
|
||||
if (con)
|
||||
return;
|
||||
|
||||
printf("kmsg_dump:\n");
|
||||
|
Loading…
Reference in New Issue
Block a user