diff options
author | Libo Chen <clbchenlibo.chen@huawei.com> | 2013-05-29 22:22:16 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-30 16:52:14 -0400 |
commit | 8268df26369f7779d3394ec066d72cc00232efe1 (patch) | |
tree | 237868bd89bcc4b264b25478caed1dab3bd4703a /drivers/mtd | |
parent | d2b1bd1422d9385cc5f463e3cc6ea0cbe7e98b70 (diff) |
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@gmail.com>
Signed-off-by: Libo chen <libo.chen@huawei.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/bcm47xxsflash.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/mtd/devices/bcm47xxsflash.c b/drivers/mtd/devices/bcm47xxsflash.c index fa56a47a598d..e9e38877a571 100644 --- a/drivers/mtd/devices/bcm47xxsflash.c +++ b/drivers/mtd/devices/bcm47xxsflash.c | |||
@@ -176,22 +176,4 @@ static struct platform_driver bcma_sflash_driver = { | |||
176 | * Init | 176 | * Init |
177 | **************************************************/ | 177 | **************************************************/ |
178 | 178 | ||
179 | static int __init bcm47xxsflash_init(void) | 179 | module_platform_driver(bcma_sflash_driver); |
180 | { | ||
181 | int err; | ||
182 | |||
183 | err = platform_driver_register(&bcma_sflash_driver); | ||
184 | if (err) | ||
185 | pr_err("Failed to register BCMA serial flash driver: %d\n", | ||
186 | err); | ||
187 | |||
188 | return err; | ||
189 | } | ||
190 | |||
191 | static void __exit bcm47xxsflash_exit(void) | ||
192 | { | ||
193 | platform_driver_unregister(&bcma_sflash_driver); | ||
194 | } | ||
195 | |||
196 | module_init(bcm47xxsflash_init); | ||
197 | module_exit(bcm47xxsflash_exit); | ||