Skip to content

Commit

Permalink
smb347-charger: Convert to use module_i2c_driver()
Browse files Browse the repository at this point in the history
This reduces the amount of boilerplate code in the driver and
makes it a bit simpler.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
  • Loading branch information
Mika Westerberg authored and Anton Vorontsov committed May 5, 2012
1 parent e6fe359 commit b75ef1d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/power/smb347-charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,17 +1285,7 @@ static struct i2c_driver smb347_driver = {
.id_table = smb347_id,
};

static int __init smb347_init(void)
{
return i2c_add_driver(&smb347_driver);
}
module_init(smb347_init);

static void __exit smb347_exit(void)
{
i2c_del_driver(&smb347_driver);
}
module_exit(smb347_exit);
module_i2c_driver(smb347_driver);

MODULE_AUTHOR("Bruce E. Robertson <bruce.e.robertson@intel.com>");
MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
Expand Down

0 comments on commit b75ef1d

Please sign in to comment.