diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-11-27 06:58:45 +0100 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-01-06 03:41:01 +0100 |
commit | 463df5147edb2d8e3df1300b02c192a5642e72c4 (patch) | |
tree | 70ccaa05410212a52cd7f387463910ea4cf988cd /drivers/power | |
parent | bq2415x_charger: Remove unneeded version.h inclusion (diff) | |
download | linux-463df5147edb2d8e3df1300b02c192a5642e72c4.tar.xz linux-463df5147edb2d8e3df1300b02c192a5642e72c4.zip |
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 <sachin.kamat@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/bq2415x_charger.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c index 2d1b568b29e3..fa1b2bd7526d 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 <pali.rohar@gmail.com>"); MODULE_DESCRIPTION("bq2415x charger driver"); |