Commit 8e217b07 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

kgdboc: Use for_each_console() helper

Replace open coded single-linked list iteration loop with for_each_console()
helper in use.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20200124161132.65519-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bb6d3fb3
......@@ -169,15 +169,13 @@ static int configure_kgdboc(void)
if (!p)
goto noconfig;
cons = console_drivers;
while (cons) {
for_each_console(cons) {
int idx;
if (cons->device && cons->device(cons, &idx) == p &&
idx == tty_line) {
kgdboc_io_ops.is_console = 1;
break;
}
cons = cons->next;
}
kgdb_tty_driver = p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment