aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2005-07-07 20:56:20 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:38 -0400
commit320da0d23ed1f82a896e0cfc1549a896d267777a (patch)
treeea61c002d0d1e0448fa47e006b0e6700bfb1af97 /drivers/char
parent2b9e0bac9419404a2d210ccaffaec442fe63338e (diff)
[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 <miltonm@bga.com> Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hvc_console.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index e7362c195b11..0f9d356d3bd9 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -846,8 +846,9 @@ int __init hvc_init(void)
846} 846}
847module_init(hvc_init); 847module_init(hvc_init);
848 848
849/* This isn't particularily necessary due to this being a console driver but it 849/* This isn't particularily necessary due to this being a console driver
850 * is nice to be thorough */ 850 * but it is nice to be thorough.
851 */
851static void __exit hvc_exit(void) 852static void __exit hvc_exit(void)
852{ 853{
853 kthread_stop(hvc_task); 854 kthread_stop(hvc_task);
@@ -856,5 +857,6 @@ static void __exit hvc_exit(void)
856 tty_unregister_driver(hvc_driver); 857 tty_unregister_driver(hvc_driver);
857 /* return tty_struct instances allocated in hvc_init(). */ 858 /* return tty_struct instances allocated in hvc_init(). */
858 put_tty_driver(hvc_driver); 859 put_tty_driver(hvc_driver);
860 unregister_console(&hvc_con_driver);
859} 861}
860module_exit(hvc_exit); 862module_exit(hvc_exit);