aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/max17042_battery.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-21 01:42:54 -0500
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-03-26 12:41:22 -0400
commit5ff92e7ab3591299089cfba440acb4d2ba8ab92f (patch)
tree342c94c993ef2ea65b8d0c2599f1306e2d1a23e3 /drivers/power/max17042_battery.c
parente2c5f7db789a5be8ba131e9fe3e87b66bc606e3b (diff)
power_supply: Convert i2c drivers to module_i2c_driver
Factor out some boilerplate code for i2c driver registration into module_i2c_driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Woogyom Kim <milo.kim@ti.com> Cc: Daniel Jeong <daniel.jeong@ti.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Peter Edwards <sweetlilmre@gmail.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Acked-by: Ryan Mallon <rmallon@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power/max17042_battery.c')
-rw-r--r--drivers/power/max17042_battery.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index e36763a4f0f0..5474e76d36fb 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -751,18 +751,7 @@ static struct i2c_driver max17042_i2c_driver = {
751 .remove = __devexit_p(max17042_remove), 751 .remove = __devexit_p(max17042_remove),
752 .id_table = max17042_id, 752 .id_table = max17042_id,
753}; 753};
754 754module_i2c_driver(max17042_i2c_driver);
755static int __init max17042_init(void)
756{
757 return i2c_add_driver(&max17042_i2c_driver);
758}
759module_init(max17042_init);
760
761static void __exit max17042_exit(void)
762{
763 i2c_del_driver(&max17042_i2c_driver);
764}
765module_exit(max17042_exit);
766 755
767MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>"); 756MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
768MODULE_DESCRIPTION("MAX17042 Fuel Gauge"); 757MODULE_DESCRIPTION("MAX17042 Fuel Gauge");