summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/latch-addr-flash.c
diff options
context:
space:
mode:
authorAxel Lin2011-11-27 13:45:03 +0100
committerDavid Woodhouse2012-01-09 19:12:35 +0100
commitf99640dee209df4730f35a28b02693affd571ad5 (patch)
treee09afc21f8fe3616af01bb23f5ae1b08b9290873 /drivers/mtd/maps/latch-addr-flash.c
parentDocumentation: add sysfs entries for mtd docg3 chips (diff)
downloadkernel-qcow2-linux-f99640dee209df4730f35a28b02693affd571ad5.tar.gz
kernel-qcow2-linux-f99640dee209df4730f35a28b02693affd571ad5.tar.xz
kernel-qcow2-linux-f99640dee209df4730f35a28b02693affd571ad5.zip
mtd: convert drivers/mtd/* to use module_platform_driver()
This patch converts the drivers in drivers/mtd/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps/latch-addr-flash.c')
-rw-r--r--drivers/mtd/maps/latch-addr-flash.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
index 119baa7d7477..8fed58e3a4a8 100644
--- a/drivers/mtd/maps/latch-addr-flash.c
+++ b/drivers/mtd/maps/latch-addr-flash.c
@@ -223,17 +223,7 @@ static struct platform_driver latch_addr_flash_driver = {
},
};
-static int __init latch_addr_flash_init(void)
-{
- return platform_driver_register(&latch_addr_flash_driver);
-}
-module_init(latch_addr_flash_init);
-
-static void __exit latch_addr_flash_exit(void)
-{
- platform_driver_unregister(&latch_addr_flash_driver);
-}
-module_exit(latch_addr_flash_exit);
+module_platform_driver(latch_addr_flash_driver);
MODULE_AUTHOR("David Griego <dgriego@mvista.com>");
MODULE_DESCRIPTION("MTD map driver for flashes addressed physically with upper "