Video / cobalt_lcdfb: Use module_platform_driver() to simplify code
authorHanjun Guo <hanjun.guo@linaro.org>
Sun, 29 Sep 2013 05:32:06 +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/cobalt_lcdfb.c

index a9031498e10c9f38b45b39bdfa848a528bd58128..a7b0ab62b97b40b2e76891a0993ba39a6c85c546 100644 (file)
@@ -395,19 +395,7 @@ static struct platform_driver cobalt_lcdfb_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init cobalt_lcdfb_init(void)
-{
-       return platform_driver_register(&cobalt_lcdfb_driver);
-}
-
-static void __exit cobalt_lcdfb_exit(void)
-{
-       platform_driver_unregister(&cobalt_lcdfb_driver);
-}
-
-module_init(cobalt_lcdfb_init);
-module_exit(cobalt_lcdfb_exit);
+module_platform_driver(cobalt_lcdfb_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_AUTHOR("Yoichi Yuasa");