diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-21 01:42:54 -0500 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-03-26 12:41:22 -0400 |
commit | 5ff92e7ab3591299089cfba440acb4d2ba8ab92f (patch) | |
tree | 342c94c993ef2ea65b8d0c2599f1306e2d1a23e3 /drivers/power/ds2782_battery.c | |
parent | e2c5f7db789a5be8ba131e9fe3e87b66bc606e3b (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/ds2782_battery.c')
-rw-r--r-- | drivers/power/ds2782_battery.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c index bfbce5de49da..6bb6e2f5ea81 100644 --- a/drivers/power/ds2782_battery.c +++ b/drivers/power/ds2782_battery.c | |||
@@ -403,18 +403,7 @@ static struct i2c_driver ds278x_battery_driver = { | |||
403 | .remove = ds278x_battery_remove, | 403 | .remove = ds278x_battery_remove, |
404 | .id_table = ds278x_id, | 404 | .id_table = ds278x_id, |
405 | }; | 405 | }; |
406 | 406 | module_i2c_driver(ds278x_battery_driver); | |
407 | static int __init ds278x_init(void) | ||
408 | { | ||
409 | return i2c_add_driver(&ds278x_battery_driver); | ||
410 | } | ||
411 | module_init(ds278x_init); | ||
412 | |||
413 | static void __exit ds278x_exit(void) | ||
414 | { | ||
415 | i2c_del_driver(&ds278x_battery_driver); | ||
416 | } | ||
417 | module_exit(ds278x_exit); | ||
418 | 407 | ||
419 | MODULE_AUTHOR("Ryan Mallon"); | 408 | MODULE_AUTHOR("Ryan Mallon"); |
420 | MODULE_DESCRIPTION("Maxim/Dallas DS2782 Stand-Alone Fuel Gauage IC driver"); | 409 | MODULE_DESCRIPTION("Maxim/Dallas DS2782 Stand-Alone Fuel Gauage IC driver"); |