From f99640dee209df4730f35a28b02693affd571ad5 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 27 Nov 2011 20:45:03 +0800 Subject: 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 Acked by: Haojian Zhuang Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- drivers/mtd/maps/ixp2000.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/mtd/maps/ixp2000.c') diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c index 437fcd2f352..fc7d4d0d9a4 100644 --- a/drivers/mtd/maps/ixp2000.c +++ b/drivers/mtd/maps/ixp2000.c @@ -246,18 +246,8 @@ static struct platform_driver ixp2000_flash_driver = { }, }; -static int __init ixp2000_flash_init(void) -{ - return platform_driver_register(&ixp2000_flash_driver); -} - -static void __exit ixp2000_flash_exit(void) -{ - platform_driver_unregister(&ixp2000_flash_driver); -} +module_platform_driver(ixp2000_flash_driver); -module_init(ixp2000_flash_init); -module_exit(ixp2000_flash_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Deepak Saxena "); MODULE_ALIAS("platform:IXP2000-Flash"); -- cgit v1.2.2