Skip to content

Commit

Permalink
mtd: bcm47xxsflash: convert to module_platform_driver instead of init…
Browse files Browse the repository at this point in the history
…/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>
  • Loading branch information
Libo Chen authored and David Woodhouse committed Aug 30, 2013
1 parent d2b1bd1 commit 8268df2
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions drivers/mtd/devices/bcm47xxsflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 8268df2

Please sign in to comment.