mtd: bcm47xxsflash: convert to module_platform_driver instead of init/exit
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Aug 30 16:59:05 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8268df26369f7779d3394ec066d72cc00232efe1
Commit: 8268df26369f7779d3394ec066d72cc00232efe1
Parent: d2b1bd1422d9385cc5f463e3cc6ea0cbe7e98b70
Author: Libo Chen <clbchenlibo.chen at huawei.com>
AuthorDate: Thu May 30 10:22:16 2013 +0800
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 21:52:14 2013 +0100
mtd: bcm47xxsflash: convert to module_platform_driver instead of init/exit
convert to module_platform_driver instead of init/exit
Suggested-by: Andy Shevchenko <andy.shevchenko at gmail.com>
Signed-off-by: Libo chen <libo.chen at huawei.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/devices/bcm47xxsflash.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/mtd/devices/bcm47xxsflash.c b/drivers/mtd/devices/bcm47xxsflash.c
index fa56a47..e9e3887 100644
--- a/drivers/mtd/devices/bcm47xxsflash.c
+++ b/drivers/mtd/devices/bcm47xxsflash.c
@@ -176,22 +176,4 @@ static struct platform_driver bcma_sflash_driver = {
* Init
**************************************************/
-static int __init bcm47xxsflash_init(void)
-{
- int err;
-
- err = platform_driver_register(&bcma_sflash_driver);
- if (err)
- pr_err("Failed to register BCMA serial flash driver: %d\n",
- err);
-
- return err;
-}
-
-static void __exit bcm47xxsflash_exit(void)
-{
- platform_driver_unregister(&bcma_sflash_driver);
-}
-
-module_init(bcm47xxsflash_init);
-module_exit(bcm47xxsflash_exit);
+module_platform_driver(bcma_sflash_driver);
More information about the linux-mtd-cvs
mailing list