diff mbox

[2/2] ide / ide_platform: Use module_platform_driver() to simplify code

Message ID 1380436317-8629-2-git-send-email-hanjun.guo@linaro.org
State New
Headers show

Commit Message

Hanjun Guo Sept. 29, 2013, 6:31 a.m. UTC
Convert to module_platform_driver() to simplify code.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
 drivers/ide/ide_platform.c |   14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
diff mbox

Patch

diff --git a/drivers/ide/ide_platform.c b/drivers/ide/ide_platform.c
index a8b4b6a..799d0c6 100644
--- a/drivers/ide/ide_platform.c
+++ b/drivers/ide/ide_platform.c
@@ -130,20 +130,8 @@  static struct platform_driver platform_ide_driver = {
 	.probe = plat_ide_probe,
 	.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);