Patchwork serial: sunsu: add missing platform_driver_unregister() when module exit

login
register
mail settings
Submitter Wei Yongjun
Date April 27, 2013, 10:13 a.m.
Message ID <CAPgLHd_4TH7Ur2VWtqHD3puc9eCkfHKEP9dA-ZwnxE8MtpGLww@mail.gmail.com>
Download mbox | patch
Permalink /patch/240099/
State Accepted
Delegated to: David Miller
Headers show

Comments

Wei Yongjun - April 27, 2013, 10:13 a.m.
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

We have registered platform driver when module init, and
need unregister it when module exit.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
no compile test.
---
 drivers/tty/serial/sunsu.c | 1 +
 1 file changed, 1 insertion(+)


--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - May 5, 2013, 1:32 a.m.
From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Sat, 27 Apr 2013 18:13:16 +0800

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> We have registered platform driver when module init, and
> need unregister it when module exit.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c
index 451687c..0d84657 100644
--- a/drivers/tty/serial/sunsu.c
+++ b/drivers/tty/serial/sunsu.c
@@ -1592,6 +1592,7 @@  static int __init sunsu_init(void)
 
 static void __exit sunsu_exit(void)
 {
+	platform_driver_unregister(&su_driver);
 	if (sunsu_reg.nr)
 		sunserial_unregister_minors(&sunsu_reg, sunsu_reg.nr);
 }