Skip to content

Commit 8268df2

Browse files
Libo ChenDavid Woodhouse
authored andcommitted
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>
1 parent d2b1bd1 commit 8268df2

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

drivers/mtd/devices/bcm47xxsflash.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -176,22 +176,4 @@ static struct platform_driver bcma_sflash_driver = {
176176
* Init
177177
**************************************************/
178178

179-
static int __init bcm47xxsflash_init(void)
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);
179+
module_platform_driver(bcma_sflash_driver);

0 commit comments

Comments
 (0)