diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2014-05-31 02:36:49 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-05-31 02:36:49 +0900 |
commit | fced6dee29f6fb143fe16ea90331176ff77e6120 (patch) | |
tree | 5b6e57e7a757adc2a6518ce291a4d2914397b917 /drivers/char/ttyprintk.c | |
parent | bfed1074f213051e94648bfad0d0611a16d81366 (diff) | |
parent | be1f7c8d7e2bc8b8c76846aa6f276e8d2ef8975a (diff) |
Merge branch 'v3.16-next/cleanup-samsung' into v3.16-next/platform-exynos
Diffstat (limited to 'drivers/char/ttyprintk.c')
-rw-r--r-- | drivers/char/ttyprintk.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c index daea84c4174..a15ce4ef39c 100644 --- a/drivers/char/ttyprintk.c +++ b/drivers/char/ttyprintk.c @@ -17,7 +17,7 @@ #include <linux/device.h> #include <linux/serial.h> #include <linux/tty.h> -#include <linux/export.h> +#include <linux/module.h> struct ttyprintk_port { struct tty_port port; @@ -210,10 +210,19 @@ static int __init ttyprintk_init(void) return 0; error: - tty_unregister_driver(ttyprintk_driver); put_tty_driver(ttyprintk_driver); tty_port_destroy(&tpk_port.port); - ttyprintk_driver = NULL; return ret; } + +static void __exit ttyprintk_exit(void) +{ + tty_unregister_driver(ttyprintk_driver); + put_tty_driver(ttyprintk_driver); + tty_port_destroy(&tpk_port.port); +} + device_initcall(ttyprintk_init); +module_exit(ttyprintk_exit); + +MODULE_LICENSE("GPL"); |