mtd: bf5xx_nand: Use module_platform_driver()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Apr 5 09:59:02 EDT 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=5884974eda0f7fa59d8a1a8e06169f0a2dba6bf3
Commit:     5884974eda0f7fa59d8a1a8e06169f0a2dba6bf3
Parent:     ef54f87366fc207e5db006a720deb5cda4e9778f
Author:     Sachin Kamat <sachin.kamat at linaro.org>
AuthorDate: Mon Mar 18 16:46:49 2013 +0530
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Apr 5 14:04:45 2013 +0100

    mtd: bf5xx_nand: Use module_platform_driver()
    
    module_platform_driver macro removes some boilerplate and makes
    the code simpler.
    
    Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/bf5xx_nand.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 4271e94..776df36 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -874,21 +874,7 @@ static struct platform_driver bf5xx_nand_driver = {
 	},
 };
 
-static int __init bf5xx_nand_init(void)
-{
-	printk(KERN_INFO "%s, Version %s (c) 2007 Analog Devices, Inc.\n",
-		DRV_DESC, DRV_VERSION);
-
-	return platform_driver_register(&bf5xx_nand_driver);
-}
-
-static void __exit bf5xx_nand_exit(void)
-{
-	platform_driver_unregister(&bf5xx_nand_driver);
-}
-
-module_init(bf5xx_nand_init);
-module_exit(bf5xx_nand_exit);
+module_platform_driver(bf5xx_nand_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR(DRV_AUTHOR);



More information about the linux-mtd-cvs mailing list