[PATCH 5/14] hvc_console: Unregister the console in the exit routine.
Anton Blanchard
anton at samba.org
Thu Jul 7 01:53:55 EST 2005
From: Milton Miller <miltonm at bga.com>
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 <miltonm at bga.com>
Signed-off-by: Anton Blanchard <anton at samba.org>
diff -puN drivers/char/hvc_console.c~hvc-console-unregister drivers/char/hvc_console.c
--- gr_work_udbg/drivers/char/hvc_console.c~hvc-console-unregister 2005-02-08 02:32:12.656217822 -0600
+++ gr_work_udbg-miltonm/drivers/char/hvc_console.c 2005-02-08 02:32:12.666216237 -0600
@@ -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);
_
More information about the Linuxppc64-dev
mailing list