Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d835ca0f authored by Wei Yongjun's avatar Wei Yongjun Committed by Guenter Roeck
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 0962e0f1
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -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);