From b75ef1d807e20919a00bed16045537e76e0497a7 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 16 Apr 2012 11:48:38 +0300 Subject: smb347-charger: Convert to use module_i2c_driver() This reduces the amount of boilerplate code in the driver and makes it a bit simpler. Signed-off-by: Mika Westerberg Signed-off-by: Anton Vorontsov --- drivers/power/smb347-charger.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers') diff --git a/drivers/power/smb347-charger.c b/drivers/power/smb347-charger.c index 3e9df6ef8537..0dfe063f4178 100644 --- a/drivers/power/smb347-charger.c +++ b/drivers/power/smb347-charger.c @@ -1285,17 +1285,7 @@ static struct i2c_driver smb347_driver = { .id_table = smb347_id, }; -static int __init smb347_init(void) -{ - return i2c_add_driver(&smb347_driver); -} -module_init(smb347_init); - -static void __exit smb347_exit(void) -{ - i2c_del_driver(&smb347_driver); -} -module_exit(smb347_exit); +module_i2c_driver(smb347_driver); MODULE_AUTHOR("Bruce E. Robertson "); MODULE_AUTHOR("Mika Westerberg "); -- cgit v1.2.3