]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
video: convert mbxfb to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Fri, 9 Dec 2011 01:57:53 +0000 (09:57 +0800)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Mon, 19 Dec 2011 20:21:43 +0000 (20:21 +0000)
This patch converts mbxfb to use the module_platform_driver() macro
which makes the code smaller and a bit simpler.

Cc: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/mbx/mbxfb.c

index 6ce34160da7866484a9fb78f6e846ac2e3ea6d66..55bf6196b7a0e1185c6237df1f3b4baae5f7cb97 100644 (file)
@@ -1053,18 +1053,7 @@ static struct platform_driver mbxfb_driver = {
        },
 };
 
-int __devinit mbxfb_init(void)
-{
-       return platform_driver_register(&mbxfb_driver);
-}
-
-static void __devexit mbxfb_exit(void)
-{
-       platform_driver_unregister(&mbxfb_driver);
-}
-
-module_init(mbxfb_init);
-module_exit(mbxfb_exit);
+module_platform_driver(mbxfb_driver);
 
 MODULE_DESCRIPTION("loadable framebuffer driver for Marathon device");
 MODULE_AUTHOR("Mike Rapoport, Compulab");