Message ID | 1354986980-10489-1-git-send-email-develkernel412222@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c index ee842b3..b05df0a 100644 --- a/drivers/power/bq2415x_charger.c +++ b/drivers/power/bq2415x_charger.c @@ -1653,18 +1653,7 @@ static struct i2c_driver bq2415x_driver = { .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 <pali.rohar@gmail.com>"); MODULE_DESCRIPTION("bq2415x charger driver"); MODULE_LICENSE("GPL");
use the module_i2c_driver macro and reduce code and also remove the duplicated module init and exit places. Signed-off-by: Devendra Naga <develkernel412222@gmail.com> --- drivers/power/bq2415x_charger.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)