From 5ff92e7ab3591299089cfba440acb4d2ba8ab92f Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 21 Jan 2012 14:42:54 +0800 Subject: power_supply: Convert i2c drivers to module_i2c_driver Factor out some boilerplate code for i2c driver registration into module_i2c_driver. Signed-off-by: Axel Lin Cc: Woogyom Kim Cc: Daniel Jeong Cc: Minkyu Kang Cc: Peter Edwards Acked-by: Milo(Woogyom) Kim Acked-by: Rhyland Klein Acked-by: Ryan Mallon Signed-off-by: Anton Vorontsov --- drivers/power/sbs-battery.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/power/sbs-battery.c') diff --git a/drivers/power/sbs-battery.c b/drivers/power/sbs-battery.c index 9ff8af069da6..06b659d91790 100644 --- a/drivers/power/sbs-battery.c +++ b/drivers/power/sbs-battery.c @@ -852,18 +852,7 @@ static struct i2c_driver sbs_battery_driver = { .of_match_table = sbs_dt_ids, }, }; - -static int __init sbs_battery_init(void) -{ - return i2c_add_driver(&sbs_battery_driver); -} -module_init(sbs_battery_init); - -static void __exit sbs_battery_exit(void) -{ - i2c_del_driver(&sbs_battery_driver); -} -module_exit(sbs_battery_exit); +module_i2c_driver(sbs_battery_driver); MODULE_DESCRIPTION("SBS battery monitor driver"); MODULE_LICENSE("GPL"); -- cgit v1.2.1