From: Sachin Kamat Date: Tue, 27 Nov 2012 05:58:45 +0000 (+0530) Subject: bq2415x_charger: Use module_i2c_driver X-Git-Tag: v3.9-rc1~151^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=463df5147edb2d8e3df1300b02c192a5642e72c4;p=platform%2Fkernel%2Flinux-stable.git bq2415x_charger: Use module_i2c_driver module_i2c_driver() makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat Signed-off-by: Anton Vorontsov --- diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c index 2d1b568..fa1b2bd 100644 --- a/drivers/power/bq2415x_charger.c +++ b/drivers/power/bq2415x_charger.c @@ -1651,18 +1651,7 @@ static struct i2c_driver bq2415x_driver = { .remove = bq2415x_remove, .id_table = bq2415x_i2c_id_table, }; - -static int __init bq2415x_init(void) -{ - return i2c_add_driver(&bq2415x_driver); -} -module_init(bq2415x_init); - -static void __exit bq2415x_exit(void) -{ - i2c_del_driver(&bq2415x_driver); -} -module_exit(bq2415x_exit); +module_i2c_driver(bq2415x_driver); MODULE_AUTHOR("Pali Rohár "); MODULE_DESCRIPTION("bq2415x charger driver");