From 300bac7fb85a20b2704dc3645419057992f78565 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 26 Nov 2011 12:01:10 +0800 Subject: power_supply: Convert drivers/power/* to use module_platform_driver() This patch converts the drivers in drivers/power/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Mike Rapoport Cc: Lars-Peter Clausen Cc: Nithish Mahalingam Cc: MyungJoo Ham Cc: Haojian Zhuang Cc: Balaji Rao Cc: Mark Brown Signed-off-by: Axel Lin Acked-by: Clifton Barnes Signed-off-by: Anton Vorontsov --- drivers/power/max8998_charger.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/power/max8998_charger.c') diff --git a/drivers/power/max8998_charger.c b/drivers/power/max8998_charger.c index 0737302af1d2..9b3f2bf56e70 100644 --- a/drivers/power/max8998_charger.c +++ b/drivers/power/max8998_charger.c @@ -204,17 +204,7 @@ static struct platform_driver max8998_battery_driver = { .id_table = max8998_battery_id, }; -static int __init max8998_battery_init(void) -{ - return platform_driver_register(&max8998_battery_driver); -} -module_init(max8998_battery_init); - -static void __exit max8998_battery_cleanup(void) -{ - platform_driver_unregister(&max8998_battery_driver); -} -module_exit(max8998_battery_cleanup); +module_platform_driver(max8998_battery_driver); MODULE_DESCRIPTION("MAXIM 8998 battery control driver"); MODULE_AUTHOR("MyungJoo Ham "); -- cgit v1.2.3