diff options
Diffstat (limited to 'drivers/tty/serial/kgdboc.c')
-rw-r--r-- | drivers/tty/serial/kgdboc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c index 509e71456d13..10020547c60b 100644 --- a/drivers/tty/serial/kgdboc.c +++ b/drivers/tty/serial/kgdboc.c @@ -123,7 +123,7 @@ static void kgdboc_unregister_kbd(void) i--; } } - flush_work_sync(&kgdboc_restore_input_work); + flush_work(&kgdboc_restore_input_work); } #else /* ! CONFIG_KDB_KEYBOARD */ #define kgdboc_register_kbd(x) 0 @@ -146,6 +146,8 @@ __setup("kgdboc=", kgdboc_option_setup); static void cleanup_kgdboc(void) { + if (kgdb_unregister_nmi_console()) + return; kgdboc_unregister_kbd(); if (configured == 1) kgdb_unregister_io_module(&kgdboc_io_ops); @@ -199,11 +201,18 @@ do_register: if (err) goto noconfig; + err = kgdb_register_nmi_console(); + if (err) + goto nmi_con_failed; + configured = 1; return 0; +nmi_con_failed: + kgdb_unregister_io_module(&kgdboc_io_ops); noconfig: + kgdboc_unregister_kbd(); config[0] = 0; configured = 0; cleanup_kgdboc(); |