diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-10-11 06:41:24 +0200 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2013-11-07 08:32:56 +0100 |
commit | 994bbd0e91c0dfa4dcda9097b0716607aeec5470 (patch) | |
tree | d071b51f708140b5b30f4d30d53fb57838df94b3 /drivers/mtd/nand/bcm47xxnflash | |
parent | mtd: plat-ram: Use module_platform_driver (diff) | |
download | linux-994bbd0e91c0dfa4dcda9097b0716607aeec5470.tar.xz linux-994bbd0e91c0dfa4dcda9097b0716607aeec5470.zip |
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>
Diffstat (limited to 'drivers/mtd/nand/bcm47xxnflash')
-rw-r--r-- | drivers/mtd/nand/bcm47xxnflash/main.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/bcm47xxnflash/main.c index 7bae569fdc79..2dc3aa632f6c 100644 --- a/drivers/mtd/nand/bcm47xxnflash/main.c +++ b/drivers/mtd/nand/bcm47xxnflash/main.c @@ -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); |