diff options
| author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-08 08:40:35 -0400 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2012-12-05 13:55:54 -0500 |
| commit | d835ca0fd2d50d126530b55e3c5dfe1b9038e26b (patch) | |
| tree | e3f694895fe77983a0390f0294579aeafe17f559 /drivers/hwmon | |
| parent | 0962e0f1a5634b63953db2c12edcff938f9d811d (diff) | |
hwmon: (ina2xx) use module_i2c_driver to simplify the code
Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
| -rw-r--r-- | drivers/hwmon/ina2xx.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c index 2b726346f8f..8e7158c3ad2 100644 --- a/drivers/hwmon/ina2xx.c +++ b/drivers/hwmon/ina2xx.c | |||
| @@ -302,19 +302,8 @@ static struct i2c_driver ina2xx_driver = { | |||
| 302 | .id_table = ina2xx_id, | 302 | .id_table = ina2xx_id, |
| 303 | }; | 303 | }; |
| 304 | 304 | ||
| 305 | static int __init ina2xx_init(void) | 305 | module_i2c_driver(ina2xx_driver); |
| 306 | { | ||
| 307 | return i2c_add_driver(&ina2xx_driver); | ||
| 308 | } | ||
| 309 | |||
| 310 | static void __exit ina2xx_exit(void) | ||
| 311 | { | ||
| 312 | i2c_del_driver(&ina2xx_driver); | ||
| 313 | } | ||
| 314 | 306 | ||
| 315 | MODULE_AUTHOR("Lothar Felten <l-felten@ti.com>"); | 307 | MODULE_AUTHOR("Lothar Felten <l-felten@ti.com>"); |
| 316 | MODULE_DESCRIPTION("ina2xx driver"); | 308 | MODULE_DESCRIPTION("ina2xx driver"); |
| 317 | MODULE_LICENSE("GPL"); | 309 | MODULE_LICENSE("GPL"); |
| 318 | |||
| 319 | module_init(ina2xx_init); | ||
| 320 | module_exit(ina2xx_exit); | ||
