Patchwork pata_samsung_cf: use module_platform_driver_probe()

login
register
mail settings
Submitter Jingoo Han
Date March 4, 2013, 8:34 a.m.
Message ID <015401ce18b3$1eb9aaa0$5c2cffe0$%han@samsung.com>
Download mbox | patch
Permalink /patch/224638/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Jingoo Han - March 4, 2013, 8:34 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/ata/pata_samsung_cf.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
Jeff Garzik - March 4, 2013, 10:14 p.m.
On 03/04/2013 03:34 AM, Jingoo Han wrote:
> 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/ata/pata_samsung_cf.c |   13 +------------
>   1 files changed, 1 insertions(+), 12 deletions(-)

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/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c
index 70b0e01..6ef27e9 100644
--- a/drivers/ata/pata_samsung_cf.c
+++ b/drivers/ata/pata_samsung_cf.c
@@ -661,18 +661,7 @@  static struct platform_driver pata_s3c_driver = {
 	},
 };
 
-static int __init pata_s3c_init(void)
-{
-	return platform_driver_probe(&pata_s3c_driver, pata_s3c_probe);
-}
-
-static void __exit pata_s3c_exit(void)
-{
-	platform_driver_unregister(&pata_s3c_driver);
-}
-
-module_init(pata_s3c_init);
-module_exit(pata_s3c_exit);
+module_platform_driver_probe(pata_s3c_driver, pata_s3c_probe);
 
 MODULE_AUTHOR("Abhilash Kesavan, <a.kesavan@samsung.com>");
 MODULE_DESCRIPTION("low-level driver for Samsung PATA controller");