Patchwork [3/3] ide: gayle: use module_platform_driver_probe()

login
register
mail settings
Submitter Jingoo Han
Date March 5, 2013, 2:27 a.m.
Message ID <005001ce1948$ffebdb70$ffc39250$%han@samsung.com>
Download mbox | patch
Permalink /patch/224915/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jingoo Han - March 5, 2013, 2:27 a.m.
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/ide/gayle.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)
David Miller - March 8, 2013, 5:39 p.m.
From: Jingoo Han <jg1.han@samsung.com>
Date: Tue, 05 Mar 2013 11:27:36 +0900

> This patch uses module_platform_driver_probe() macro which makes
> the code smaller and simpler.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ide/gayle.c b/drivers/ide/gayle.c
index 51beb85..0a8440a 100644
--- a/drivers/ide/gayle.c
+++ b/drivers/ide/gayle.c
@@ -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");