mtd: nand/gpio: Convert to module_platform_driver()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Sep 29 10:59:47 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=2fe87aef33b77d66fada83f5dc57b6798ad5df07
Commit: 2fe87aef33b77d66fada83f5dc57b6798ad5df07
Parent: 24b82d3c350dfc16cd4a7de87ca0959ff5fbaa15
Author: Sachin Kamat <sachin.kamat at linaro.org>
AuthorDate: Wed Sep 5 15:31:32 2012 +0530
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Sat Sep 29 15:44:02 2012 +0100
mtd: nand/gpio: Convert to module_platform_driver()
module_platform_driver simplifies the code by eliminating
module_init and module_exit calls.
Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/gpio.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c
index ce6a284..bc73bc5 100644
--- a/drivers/mtd/nand/gpio.c
+++ b/drivers/mtd/nand/gpio.c
@@ -417,20 +417,7 @@ static struct platform_driver gpio_nand_driver = {
},
};
-static int __init gpio_nand_init(void)
-{
- printk(KERN_INFO "GPIO NAND driver, © 2004 Simtec Electronics\n");
-
- return platform_driver_register(&gpio_nand_driver);
-}
-
-static void __exit gpio_nand_exit(void)
-{
- platform_driver_unregister(&gpio_nand_driver);
-}
-
-module_init(gpio_nand_init);
-module_exit(gpio_nand_exit);
+module_platform_driver(gpio_nand_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ben Dooks <ben at simtec.co.uk>");
More information about the linux-mtd-cvs
mailing list