Video / bf54x-lq043fb: Use module_platform_driver() to simplify code
authorHanjun Guo <hanjun.guo@linaro.org>
Sun, 29 Sep 2013 05:32:08 +0000 (13:32 +0800)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 30 Sep 2013 07:51:09 +0000 (10:51 +0300)
Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/bf54x-lq043fb.c

index 87f288bfc58c3464e44645e9264a991d28045895..42b8f9d1101834d3f5fe09dde3b44e23a2e97b74 100644 (file)
@@ -761,19 +761,7 @@ static struct platform_driver bfin_bf54x_driver = {
                   .owner = THIS_MODULE,
                   },
 };
-
-static int __init bfin_bf54x_driver_init(void)
-{
-       return platform_driver_register(&bfin_bf54x_driver);
-}
-
-static void __exit bfin_bf54x_driver_cleanup(void)
-{
-       platform_driver_unregister(&bfin_bf54x_driver);
-}
+module_platform_driver(bfin_bf54x_driver);
 
 MODULE_DESCRIPTION("Blackfin BF54x TFT LCD Driver");
 MODULE_LICENSE("GPL");
-
-module_init(bfin_bf54x_driver_init);
-module_exit(bfin_bf54x_driver_cleanup);