ide: gayle: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Mon, 4 Mar 2013 16:27:36 +0000 (16:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2013 17:38:15 +0000 (12:38 -0500)
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/gayle.c

index 51beb85250d4400a06e90eca0b4f539825cc7438..0a8440ae05656569a9694f7bdb9f8406118ac785 100644 (file)
@@ -183,20 +183,7 @@ static struct platform_driver amiga_gayle_ide_driver = {
        },
 };
 
-static int __init amiga_gayle_ide_init(void)
-{
-       return platform_driver_probe(&amiga_gayle_ide_driver,
-                                    amiga_gayle_ide_probe);
-}
-
-module_init(amiga_gayle_ide_init);
-
-static void __exit amiga_gayle_ide_exit(void)
-{
-       platform_driver_unregister(&amiga_gayle_ide_driver);
-}
-
-module_exit(amiga_gayle_ide_exit);
+module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:amiga-gayle-ide");