mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
mtd: bcm47xxnflash: Use module_platform_driver
module_platform_driver simplifies the code by removing boiler plate. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
parent
98a7c7475d
commit
994bbd0e91
1 changed files with 1 additions and 19 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue