Skip to contentSkip to conversation

hwmon: (it87) Use feature macros on sio_data

PATCH In review Guenter Roeck 2 participants 3 messages Apr 4, 2015 – Apr 9, 2015

Subsystems (2)
lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 2/22 hwmon: (it87) Use feature macros on sio_data

Feature macros work on sio_data as well, so use them there.

---
 drivers/hwmon/it87.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/hwmon/it87.c +5 -2
index 32180aaa4ac6..04b929cc21f3 100644
@@ -1821,6 +1821,7 @@ static int __init it87_find(unsigned short *address,
 	int err;
 	u16 chip_type;
 	const char *board_vendor, *board_name;
+	const struct it87_devices *config;
 
 	err = superio_enter();
 	if (err)
@@ -1905,8 +1906,10 @@ static int __init it87_find(unsigned short *address,
 		it87_devices[sio_data->type].suffix,
 		*address, sio_data->revision);
 
+	config = &it87_devices[sio_data->type];
+
 	/* in7 (VSB or VCCH5V) is always internal on some chips */
-	if (it87_devices[sio_data->type].features & FEAT_IN7_INTERNAL)
+	if (has_in7_internal(config))
 		sio_data->internal |= (1 << 1);
 
 	/* in8 (Vbat) is always internal */
@@ -1916,7 +1919,7 @@ static int __init it87_find(unsigned short *address,
 	if (sio_data->type != it8603)
 		sio_data->skip_in |= (1 << 9);
 
-	if (!(it87_devices[sio_data->type].features & FEAT_VID))
+	if (!has_vid(config))
 		sio_data->skip_vid = 1;
 
 	/* Read GPIO config and VID value from LDN 7 (GPIO) */
Signature · 7 lines
2.1.0


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Reviewed-by on v1 2/22
#1 lore raw
Quoted 7 lines · Guenter Roeck

Feature macros work on sio_data as well, so use them there.

---
 drivers/hwmon/it87.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(...)

I like it.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
author maintainer
#2 lore raw
In reply to Guenter Roeck
Quoted 9 lines · Jean Delvare
Quoted 7 lines · Guenter Roeck

Feature macros work on sio_data as well, so use them there.

---
  drivers/hwmon/it87.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)

(...)

Quoted 4 lines

I like it.

Thanks!

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors