[07/10] Video / broadsheetfb: Use module_platform_driver() to simplify code

Message ID 1380432730-7263-8-git-send-email-hanjun.guo@linaro.org
State New
Headers show

Commit Message

Hanjun Guo Sept. 29, 2013, 5:32 a.m.
Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
 drivers/video/broadsheetfb.c |   14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/video/broadsheetfb.c b/drivers/video/broadsheetfb.c
index b09701c..393d5a0 100644
--- a/drivers/video/broadsheetfb.c
+++ b/drivers/video/broadsheetfb.c
@@ -1217,19 +1217,7 @@  static struct platform_driver broadsheetfb_driver = {
 		.name	= "broadsheetfb",
 	},
 };
-
-static int __init broadsheetfb_init(void)
-{
-	return platform_driver_register(&broadsheetfb_driver);
-}
-
-static void __exit broadsheetfb_exit(void)
-{
-	platform_driver_unregister(&broadsheetfb_driver);
-}
-
-module_init(broadsheetfb_init);
-module_exit(broadsheetfb_exit);
+module_platform_driver(broadsheetfb_driver);
 
 MODULE_DESCRIPTION("fbdev driver for Broadsheet controller");
 MODULE_AUTHOR("Jaya Kumar");