From: Milton Miller Date: Fri, 8 Jul 2005 00:56:20 +0000 (-0700) Subject: [PATCH] hvc_console: Unregister the console in the exit routine. X-Git-Tag: v2.6.13-rc3~287 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=320da0d23ed1f82a896e0cfc1549a896d267777a;p=~emulex%2Finfiniband.git [PATCH] hvc_console: Unregister the console in the exit routine. Be thorough in our exit routine, since it says it is there to be so. Unregistering without registering is safe (checked in 2.6.10). Signed-off-by: Milton Miller Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index e7362c195b1..0f9d356d3bd 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -846,8 +846,9 @@ int __init hvc_init(void) } module_init(hvc_init); -/* This isn't particularily necessary due to this being a console driver but it - * is nice to be thorough */ +/* This isn't particularily necessary due to this being a console driver + * but it is nice to be thorough. + */ static void __exit hvc_exit(void) { kthread_stop(hvc_task); @@ -856,5 +857,6 @@ static void __exit hvc_exit(void) tty_unregister_driver(hvc_driver); /* return tty_struct instances allocated in hvc_init(). */ put_tty_driver(hvc_driver); + unregister_console(&hvc_con_driver); } module_exit(hvc_exit);