diff mbox

[03/10] Video / metronomefb: Use module_platform_driver() to simplify code

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

Commit Message

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

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

Patch

diff --git a/drivers/video/metronomefb.c b/drivers/video/metronomefb.c
index f30150d..2d7dd8e 100644
--- a/drivers/video/metronomefb.c
+++ b/drivers/video/metronomefb.c
@@ -769,23 +769,11 @@  static struct platform_driver metronomefb_driver = {
 		.name	= "metronomefb",
 	},
 };
-
-static int __init metronomefb_init(void)
-{
-	return platform_driver_register(&metronomefb_driver);
-}
-
-static void __exit metronomefb_exit(void)
-{
-	platform_driver_unregister(&metronomefb_driver);
-}
+module_platform_driver(metronomefb_driver);
 
 module_param(user_wfm_size, uint, 0);
 MODULE_PARM_DESC(user_wfm_size, "Set custom waveform size");
 
-module_init(metronomefb_init);
-module_exit(metronomefb_exit);
-
 MODULE_DESCRIPTION("fbdev driver for Metronome controller");
 MODULE_AUTHOR("Jaya Kumar");
 MODULE_LICENSE("GPL");