mtd: plat-ram: Use module_platform_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 11 Oct 2013 04:41:23 +0000 (10:11 +0530)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 7 Nov 2013 07:32:55 +0000 (23:32 -0800)
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>
drivers/mtd/maps/plat-ram.c

index 3e35b9a330c763431674225016542f7e92568e20..10196f5a897d6b31674232652869cb5617e820ec 100644 (file)
@@ -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>");