Commit 994bbd0e authored by Sachin Kamat's avatar Sachin Kamat Committed by Brian Norris

mtd: bcm47xxnflash: Use module_platform_driver

module_platform_driver simplifies the code by removing boiler plate.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 98a7c747
......@@ -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);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment