summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-10-11 10:11:23 +0530
committerBrian Norris <computersforpeace@gmail.com>2013-11-06 23:32:55 -0800
commit98a7c7475d2381febb05d139b5db6f49eeda4427 (patch)
tree8f4dfaf65155bef65df8072d26df6834169536c8 /drivers/mtd
parent4355b70cf48363c50a9de450b01178c83aba8f6a (diff)
downloadop-kernel-dev-98a7c7475d2381febb05d139b5db6f49eeda4427.zip
op-kernel-dev-98a7c7475d2381febb05d139b5db6f49eeda4427.tar.gz
mtd: plat-ram: 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')
-rw-r--r--drivers/mtd/maps/plat-ram.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c
index 3e35b9a..10196f5 100644
--- a/drivers/mtd/maps/plat-ram.c
+++ b/drivers/mtd/maps/plat-ram.c
@@ -257,21 +257,7 @@ static struct platform_driver platram_driver = {
},
};
-/* module init/exit */
-
-static int __init platram_init(void)
-{
- printk("Generic platform RAM MTD, (c) 2004 Simtec Electronics\n");
- return platform_driver_register(&platram_driver);
-}
-
-static void __exit platram_exit(void)
-{
- platform_driver_unregister(&platram_driver);
-}
-
-module_init(platram_init);
-module_exit(platram_exit);
+module_platform_driver(platram_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
OpenPOWER on IntegriCloud