diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2012-04-16 04:48:38 -0400 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-05-05 08:34:56 -0400 |
commit | b75ef1d807e20919a00bed16045537e76e0497a7 (patch) | |
tree | 0ac95add85c16c68605c570f34d1c4b0e724a00c /drivers/power | |
parent | e6fe3597fa17dcd7ee82a5198beadb19a457a478 (diff) |
smb347-charger: Convert to use module_i2c_driver()
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>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/smb347-charger.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/power/smb347-charger.c b/drivers/power/smb347-charger.c index 3e9df6ef8537..0dfe063f4178 100644 --- a/drivers/power/smb347-charger.c +++ b/drivers/power/smb347-charger.c | |||
@@ -1285,17 +1285,7 @@ static struct i2c_driver smb347_driver = { | |||
1285 | .id_table = smb347_id, | 1285 | .id_table = smb347_id, |
1286 | }; | 1286 | }; |
1287 | 1287 | ||
1288 | static int __init smb347_init(void) | 1288 | module_i2c_driver(smb347_driver); |
1289 | { | ||
1290 | return i2c_add_driver(&smb347_driver); | ||
1291 | } | ||
1292 | module_init(smb347_init); | ||
1293 | |||
1294 | static void __exit smb347_exit(void) | ||
1295 | { | ||
1296 | i2c_del_driver(&smb347_driver); | ||
1297 | } | ||
1298 | module_exit(smb347_exit); | ||
1299 | 1289 | ||
1300 | MODULE_AUTHOR("Bruce E. Robertson <bruce.e.robertson@intel.com>"); | 1290 | MODULE_AUTHOR("Bruce E. Robertson <bruce.e.robertson@intel.com>"); |
1301 | MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>"); | 1291 | MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>"); |