ide: convert drivers/ide/* to use module_platform_driver()
PATCH 1/1 ide: convert drivers/ide/* to use module_platform_driver()
This patch converts the drivers in drivers/ide/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler.
Cc Ralf Baechle <[email protected]>
Cc Kumar Gala <[email protected]>
Signed-off-by Axel Lin <[email protected]>
--- drivers/ide/au1xxx-ide.c | 13 +------------ drivers/ide/ide_platform.c | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-)
drivers/ide/au1xxx-ide.c +1 -12
@@ -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);
drivers/ide/ide_platform.c +1 -12
@@ -133,19 +133,8 @@ static struct platform_driver platform_ide_driver = { .remove = __devexit_p(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);
Signature · 1 line
1.7.5.4
David Miller
AppliedFrom: Axel Lin <[email protected]>
Date: Sun, 27 Nov 2011 14:51:51 +0800
Quoted 7 lines
This patch converts the drivers in
drivers/ide/*to use themodule_platform_driver()macro which makes the code smaller and a bit simpler.Cc Ralf Baechle <[email protected]>Cc Kumar Gala <[email protected]>Signed-off-by Axel Lin <[email protected]>
Applied.