mtd: bcm47xxnflash: 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=994bbd0e91c0dfa4dcda9097b0716607aeec5470
Commit: 994bbd0e91c0dfa4dcda9097b0716607aeec5470
Parent: 98a7c7475d2381febb05d139b5db6f49eeda4427
Author: Sachin Kamat <sachin.kamat at linaro.org>
AuthorDate: Fri Oct 11 10:11:24 2013 +0530
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Nov 6 23:32:56 2013 -0800
mtd: bcm47xxnflash: Use module_platform_driver
module_platform_driver simplifies the code by removing boiler plate.
Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/bcm47xxnflash/main.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/bcm47xxnflash/main.c
index 7bae569..2dc3aa6 100644
--- a/drivers/mtd/nand/bcm47xxnflash/main.c
+++ b/drivers/mtd/nand/bcm47xxnflash/main.c
@@ -85,22 +85,4 @@ static struct platform_driver bcm47xxnflash_driver = {
},
};
-static int __init bcm47xxnflash_init(void)
-{
- int err;
-
- err = platform_driver_register(&bcm47xxnflash_driver);
- if (err)
- pr_err("Failed to register bcm47xx nand flash driver: %d\n",
- err);
-
- return err;
-}
-
-static void __exit bcm47xxnflash_exit(void)
-{
- platform_driver_unregister(&bcm47xxnflash_driver);
-}
-
-module_init(bcm47xxnflash_init);
-module_exit(bcm47xxnflash_exit);
+module_platform_driver(bcm47xxnflash_driver);
More information about the linux-mtd-cvs
mailing list