Skip to content

Commit

Permalink
hwmon: (ina2xx) use module_i2c_driver to simplify the code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Guenter Roeck committed Dec 5, 2012
1 parent 0962e0f commit d835ca0
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/hwmon/ina2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,19 +302,8 @@ static struct i2c_driver ina2xx_driver = {
.id_table = ina2xx_id,
};

static int __init ina2xx_init(void)
{
return i2c_add_driver(&ina2xx_driver);
}

static void __exit ina2xx_exit(void)
{
i2c_del_driver(&ina2xx_driver);
}
module_i2c_driver(ina2xx_driver);

MODULE_AUTHOR("Lothar Felten <l-felten@ti.com>");
MODULE_DESCRIPTION("ina2xx driver");
MODULE_LICENSE("GPL");

module_init(ina2xx_init);
module_exit(ina2xx_exit);

0 comments on commit d835ca0

Please sign in to comment.