[PATCH 1/3] mtd: plat-ram: Use module_platform_driver
Sachin Kamat
sachin.kamat at linaro.org
Thu Oct 10 21:41:23 PDT 2013
module_platform_driver simplifies the code by removing boiler
plate.
Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
---
drivers/mtd/maps/plat-ram.c | 16 +---------------
1 file changed, 1 insertion(+), 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 at simtec.co.uk>");
--
1.7.9.5
More information about the linux-mtd
mailing list