mtd: fsl_ifc_nand: Use module_platform_driver

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Nov 13 13:59:04 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c69ad0ef2fa58168b9aec7f7d1561c9e43376239
Commit:     c69ad0ef2fa58168b9aec7f7d1561c9e43376239
Parent:     bcecd39ef06ecf27233a30d516367d0be7e9145f
Author:     Sachin Kamat <sachin.kamat at linaro.org>
AuthorDate: Tue Oct 8 15:08:20 2013 +0530
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Nov 6 23:32:49 2013 -0800

    mtd: fsl_ifc_nand: Use module_platform_driver
    
    module_platform_driver removes boiler plate code and makes it
    simpler.
    
    Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/fsl_ifc_nand.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index 64a30ef..1c173d9 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -1079,25 +1079,7 @@ static struct platform_driver fsl_ifc_nand_driver = {
 	.remove      = fsl_ifc_nand_remove,
 };
 
-static int __init fsl_ifc_nand_init(void)
-{
-	int ret;
-
-	ret = platform_driver_register(&fsl_ifc_nand_driver);
-	if (ret)
-		printk(KERN_ERR "fsl-ifc: Failed to register platform"
-				"driver\n");
-
-	return ret;
-}
-
-static void __exit fsl_ifc_nand_exit(void)
-{
-	platform_driver_unregister(&fsl_ifc_nand_driver);
-}
-
-module_init(fsl_ifc_nand_init);
-module_exit(fsl_ifc_nand_exit);
+module_platform_driver(fsl_ifc_nand_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Freescale");



More information about the linux-mtd-cvs mailing list