[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>
This commit is contained in:
parent
2b9e0bac94
commit
320da0d23e
@ -846,8 +846,9 @@ int __init hvc_init(void)
|
|||||||
}
|
}
|
||||||
module_init(hvc_init);
|
module_init(hvc_init);
|
||||||
|
|
||||||
/* This isn't particularily necessary due to this being a console driver but it
|
/* This isn't particularily necessary due to this being a console driver
|
||||||
* is nice to be thorough */
|
* but it is nice to be thorough.
|
||||||
|
*/
|
||||||
static void __exit hvc_exit(void)
|
static void __exit hvc_exit(void)
|
||||||
{
|
{
|
||||||
kthread_stop(hvc_task);
|
kthread_stop(hvc_task);
|
||||||
@ -856,5 +857,6 @@ static void __exit hvc_exit(void)
|
|||||||
tty_unregister_driver(hvc_driver);
|
tty_unregister_driver(hvc_driver);
|
||||||
/* return tty_struct instances allocated in hvc_init(). */
|
/* return tty_struct instances allocated in hvc_init(). */
|
||||||
put_tty_driver(hvc_driver);
|
put_tty_driver(hvc_driver);
|
||||||
|
unregister_console(&hvc_con_driver);
|
||||||
}
|
}
|
||||||
module_exit(hvc_exit);
|
module_exit(hvc_exit);
|
||||||
|
Loading…
Reference in New Issue
Block a user