Skip to contentSkip to conversation

hwmon: (ina2xx) Use module_i2c_driver macro

PATCH In review Axel Lin 2 participants 2 messages Oct 11, 2012 Hardware monitoring

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 hwmon: (ina2xx) Use module_i2c_driver macro

---
 drivers/hwmon/ina2xx.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/hwmon/ina2xx.c +1 -12
index 2b72634..8e7158c 100644
@@ -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 <[email protected]>");
 MODULE_DESCRIPTION("ina2xx driver");
 MODULE_LICENSE("GPL");
-
-module_init(ina2xx_init);
-module_exit(ina2xx_exit);
Signature · 9 lines
1.7.9.5




_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
maintainer
#1 lore raw
Quoted 5 lines · Axel Lin
---
 drivers/hwmon/ina2xx.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Hi Axel,

A similar patch from Wei Yongjun is already queued in my -next branch. It is not in linux-next yet since I am supposed to hold off until the commit window closes.

Thanks,
Guenter