[PATCH -next] ssbi: use module_platform_driver to simplify the code
Wei Yongjun
weiyj.lk at gmail.com
Thu Mar 28 00:14:16 EST 2013
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
module_platform_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
---
drivers/ssbi/ssbi.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/ssbi/ssbi.c b/drivers/ssbi/ssbi.c
index f32da02..f667204 100644
--- a/drivers/ssbi/ssbi.c
+++ b/drivers/ssbi/ssbi.c
@@ -361,17 +361,7 @@ static struct platform_driver ssbi_driver = {
},
};
-static int __init ssbi_init(void)
-{
- return platform_driver_register(&ssbi_driver);
-}
-module_init(ssbi_init);
-
-static void __exit ssbi_exit(void)
-{
- platform_driver_unregister(&ssbi_driver);
-}
-module_exit(ssbi_exit)
+module_platform_driver(ssbi_driver);
MODULE_LICENSE("GPL v2");
MODULE_VERSION("1.0");
More information about the devicetree-discuss
mailing list