ide: use module_platform_driver()
authorChristoph Jaeger <christophjaeger@linux.com>
Wed, 9 Apr 2014 07:28:01 +0000 (09:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Aug 2014 04:16:46 +0000 (21:16 -0700)
Eliminate boilerplate code by using module_platform_driver().

Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/au1xxx-ide.c
drivers/ide/ide_platform.c

index 259786ca8b7551c8e0afd03d843e6eef5b4ea9bb..07ea58084068e459211e977cbd926e233db19733 100644 (file)
@@ -592,18 +592,7 @@ static struct platform_driver au1200_ide_driver = {
        .remove         = au_ide_remove,
 };
 
-static int __init au_ide_init(void)
-{
-       return platform_driver_register(&au1200_ide_driver);
-}
-
-static void __exit au_ide_exit(void)
-{
-       platform_driver_unregister(&au1200_ide_driver);
-}
+module_platform_driver(au1200_ide_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("AU1200 IDE driver");
-
-module_init(au_ide_init);
-module_exit(au_ide_exit);
index a8b4b6af80e75026b8c6bd62faa1435e613c64dd..d48de6de503e0dfa58af0c8bba0b6717e37f8195 100644 (file)
@@ -131,19 +131,8 @@ static struct platform_driver platform_ide_driver = {
        .remove = plat_ide_remove,
 };
 
-static int __init platform_ide_init(void)
-{
-       return platform_driver_register(&platform_ide_driver);
-}
-
-static void __exit platform_ide_exit(void)
-{
-       platform_driver_unregister(&platform_ide_driver);
-}
+module_platform_driver(platform_ide_driver);
 
 MODULE_DESCRIPTION("Platform IDE driver");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:pata_platform");
-
-module_init(platform_ide_init);
-module_exit(platform_ide_exit);