Re: [PATCH] SATA/PATA: convert drivers/ata/* to use module_platform_driver()

From: Viresh Kumar
Date: Sun Nov 27 2011 - 22:47:28 EST


On 11/27/2011 12:14 PM, Axel Lin wrote:
> This patch converts the drivers in drivers/ata/* to use the
> module_platform_driver() macro which makes the code smaller and a bit
> simpler.
>
> Cc: Viresh Kumar <viresh.kumar@xxxxxx>
> Cc: Jeff Garzik <jgarzik@xxxxxxxxx>
> Cc: Arnaud Patard <arnaud.patard@xxxxxxxxxxx>
> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx>
> Cc: Sylvain Munaut <tnt@xxxxxxxxxx>
> Cc: Anton Vorontsov <avorontsov@xxxxxxxxxxxxx>
> Cc: Marek Vasut <marek.vasut@xxxxxxxxx>
> Cc: Florian Fainelli <florian@xxxxxxxxxxx>
> Cc: Mark Miesfeld <mmiesfeld@xxxxxxxx>
> Cc: Ashish Kalra <ashish.kalra@xxxxxxxxxxxxx>
> Cc: Paul Mundt <lethal@xxxxxxxxxxxx>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
> ---
> drivers/ata/pata_arasan_cf.c | 12 +-----------
> drivers/ata/pata_at91.c | 15 +--------------
> drivers/ata/pata_imx.c | 12 +-----------
> drivers/ata/pata_ixp4xx_cf.c | 13 +------------
> drivers/ata/pata_mpc52xx.c | 21 +--------------------
> drivers/ata/pata_of_platform.c | 12 +-----------
> drivers/ata/pata_palmld.c | 13 +------------
> drivers/ata/pata_platform.c | 12 +-----------
> drivers/ata/pata_pxa.c | 13 +------------
> drivers/ata/pata_rb532_cf.c | 21 ++-------------------
> drivers/ata/sata_dwc_460ex.c | 13 +------------
> drivers/ata/sata_fsl.c | 14 +-------------
> 12 files changed, 13 insertions(+), 158 deletions(-)
>
> diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
> index e8574bb..048589f 100644
> --- a/drivers/ata/pata_arasan_cf.c
> +++ b/drivers/ata/pata_arasan_cf.c
> @@ -963,17 +963,7 @@ static struct platform_driver arasan_cf_driver = {
> },
> };
>
> -static int __init arasan_cf_init(void)
> -{
> - return platform_driver_register(&arasan_cf_driver);
> -}
> -module_init(arasan_cf_init);
> -
> -static void __exit arasan_cf_exit(void)
> -{
> - platform_driver_unregister(&arasan_cf_driver);
> -}
> -module_exit(arasan_cf_exit);
> +module_platform_driver(arasan_cf_driver);
>
> MODULE_AUTHOR("Viresh Kumar <viresh.kumar@xxxxxx>");
> MODULE_DESCRIPTION("Arasan ATA Compact Flash driver");

For SPEAr:

Acked-by: Viresh Kumar <viresh.kumar@xxxxxx>

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/