Skip to content

Commit

Permalink
bq2415x_charger: Use module_i2c_driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Anton Vorontsov committed Jan 6, 2013
1 parent d8ecb67 commit 463df51
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/power/bq2415x_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 463df51

Please sign in to comment.