[PATCH] mtd: convert drivers/mtd/* to use module_platform_driver()
Jiandong Zheng
jdzheng at broadcom.com
Tue Nov 29 14:50:43 EST 2011
On 11/27/2011 4:45 AM, Axel Lin wrote:
> This patch converts the drivers in drivers/mtd/* to use the
> module_platform_driver() macro which makes the code smaller and a bit
> simpler.
>
> Cc: David Woodhouse<dwmw2 at infradead.org>
> Cc: Jiandong Zheng<jdzheng at broadcom.com>
> Cc: Scott Branden<sbranden at broadcom.com>
> Cc: Wan ZongShun<mcuos.com at gmail.com>
> Cc: Dmitry Eremin-Solenikov<dbaryshkov at gmail.com>
> Cc: Jamie Iles<jamie at jamieiles.com>
> Cc: Olof Johansson<olof at lixom.net>
> Cc: Kyungmin Park<kyungmin.park at samsung.com>
> Cc: Haojian Zhuang<haojian.zhuang at gmail.com>
> Cc: Artem Bityutskiy<Artem.Bityutskiy at nokia.com>
> Cc: Ralf Baechle<ralf at linux-mips.org>
> Cc: Brian Norris<computersforpeace at gmail.com>
> Cc: Lars-Peter Clausen<lars at metafoo.de>
> Cc: Manuel Lauss<manuel.lauss at googlemail.com>
> Cc: Vimal Singh<vimal.newwork at gmail.com>
> Cc: Andres Salomon<dilinger at queued.net>
> Cc: Sukumar Ghorai<s-ghorai at ti.com>
> Signed-off-by: Axel Lin<axel.lin at gmail.com>
> ---
> drivers/mtd/nand/bcm_umi_nand.c | 13 +------------
> diff --git a/drivers/mtd/nand/bcm_umi_nand.c b/drivers/mtd/nand/bcm_umi_nand.c
> index 46b58d6..50387fd 100644
> --- a/drivers/mtd/nand/bcm_umi_nand.c
> +++ b/drivers/mtd/nand/bcm_umi_nand.c
> @@ -546,18 +546,7 @@ static struct platform_driver nand_driver = {
> .resume = bcm_umi_nand_resume,
> };
>
> -static int __init nand_init(void)
> -{
> - return platform_driver_register(&nand_driver);
> -}
> -
> -static void __exit nand_exit(void)
> -{
> - platform_driver_unregister(&nand_driver);
> -}
> -
> -module_init(nand_init);
> -module_exit(nand_exit);
> +module_platform_driver(nand_driver);
>
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Broadcom");
Acked-by: Jiandong Zheng <jdzheng at broadcom.com>
More information about the linux-mtd
mailing list