diff options
| author | Christoph Jaeger <christophjaeger@linux.com> | 2014-04-09 03:28:01 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-08-06 00:16:46 -0400 |
| commit | a53dae49b2fea43d8f4ec5aeca0e288bbc8d6895 (patch) | |
| tree | ad43b4d4624ee1216d224795e34a89966ac3d17f | |
| parent | e7fda6c4c3c1a7d6996dd75fd84670fa0b5d448f (diff) | |
ide: use module_platform_driver()
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>
| -rw-r--r-- | drivers/ide/au1xxx-ide.c | 13 | ||||
| -rw-r--r-- | drivers/ide/ide_platform.c | 13 |
2 files changed, 2 insertions, 24 deletions
diff --git a/drivers/ide/au1xxx-ide.c b/drivers/ide/au1xxx-ide.c index 259786ca8b75..07ea58084068 100644 --- a/drivers/ide/au1xxx-ide.c +++ b/drivers/ide/au1xxx-ide.c | |||
| @@ -592,18 +592,7 @@ static struct platform_driver au1200_ide_driver = { | |||
| 592 | .remove = au_ide_remove, | 592 | .remove = au_ide_remove, |
| 593 | }; | 593 | }; |
| 594 | 594 | ||
| 595 | static int __init au_ide_init(void) | 595 | module_platform_driver(au1200_ide_driver); |
| 596 | { | ||
| 597 | return platform_driver_register(&au1200_ide_driver); | ||
| 598 | } | ||
| 599 | |||
| 600 | static void __exit au_ide_exit(void) | ||
| 601 | { | ||
| 602 | platform_driver_unregister(&au1200_ide_driver); | ||
| 603 | } | ||
| 604 | 596 | ||
| 605 | MODULE_LICENSE("GPL"); | 597 | MODULE_LICENSE("GPL"); |
| 606 | MODULE_DESCRIPTION("AU1200 IDE driver"); | 598 | MODULE_DESCRIPTION("AU1200 IDE driver"); |
| 607 | |||
| 608 | module_init(au_ide_init); | ||
| 609 | module_exit(au_ide_exit); | ||
diff --git a/drivers/ide/ide_platform.c b/drivers/ide/ide_platform.c index a8b4b6af80e7..d48de6de503e 100644 --- a/drivers/ide/ide_platform.c +++ b/drivers/ide/ide_platform.c | |||
| @@ -131,19 +131,8 @@ static struct platform_driver platform_ide_driver = { | |||
| 131 | .remove = plat_ide_remove, | 131 | .remove = plat_ide_remove, |
| 132 | }; | 132 | }; |
| 133 | 133 | ||
| 134 | static int __init platform_ide_init(void) | 134 | module_platform_driver(platform_ide_driver); |
| 135 | { | ||
| 136 | return platform_driver_register(&platform_ide_driver); | ||
| 137 | } | ||
| 138 | |||
| 139 | static void __exit platform_ide_exit(void) | ||
| 140 | { | ||
| 141 | platform_driver_unregister(&platform_ide_driver); | ||
| 142 | } | ||
| 143 | 135 | ||
| 144 | MODULE_DESCRIPTION("Platform IDE driver"); | 136 | MODULE_DESCRIPTION("Platform IDE driver"); |
| 145 | MODULE_LICENSE("GPL"); | 137 | MODULE_LICENSE("GPL"); |
| 146 | MODULE_ALIAS("platform:pata_platform"); | 138 | MODULE_ALIAS("platform:pata_platform"); |
| 147 | |||
| 148 | module_init(platform_ide_init); | ||
| 149 | module_exit(platform_ide_exit); | ||
