power: bq2414x: use module_i2c_driver macro
PATCH 1/1 power: bq2414x: use module_i2c_driver macro
use the module_i2c_driver macro and reduce code and also remove the duplicated module init and exit places.
Signed-off-by Devendra Naga <[email protected]>
--- drivers/power/bq2415x_charger.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/power/bq2415x_charger.c +1 -12
@@ -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 <[email protected]>" );MODULE_DESCRIPTION ("bq2415x charger driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
1.7.10.4