aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2015-03-31 12:31:34 -0400
committerGuenter Roeck <linux@roeck-us.net>2015-04-09 09:39:11 -0400
commitf83a9cb6228472a464c2ab4abb9bd1e83939aec2 (patch)
tree87b03308cce032571d90209cbf9f35338068637f
parent8416915c16d4335980c5d5d6d39957adbfe40b55 (diff)
hwmon: (it87) Use feature macros on sio_data
Feature macros work on sio_data as well, so use them there. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/it87.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 8acbe8f852d1..d0ee556e8ce0 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -1821,6 +1821,7 @@ static int __init it87_find(unsigned short *address,
1821 int err; 1821 int err;
1822 u16 chip_type; 1822 u16 chip_type;
1823 const char *board_vendor, *board_name; 1823 const char *board_vendor, *board_name;
1824 const struct it87_devices *config;
1824 1825
1825 err = superio_enter(); 1826 err = superio_enter();
1826 if (err) 1827 if (err)
@@ -1905,8 +1906,10 @@ static int __init it87_find(unsigned short *address,
1905 it87_devices[sio_data->type].suffix, 1906 it87_devices[sio_data->type].suffix,
1906 *address, sio_data->revision); 1907 *address, sio_data->revision);
1907 1908
1909 config = &it87_devices[sio_data->type];
1910
1908 /* in7 (VSB or VCCH5V) is always internal on some chips */ 1911 /* in7 (VSB or VCCH5V) is always internal on some chips */
1909 if (it87_devices[sio_data->type].features & FEAT_IN7_INTERNAL) 1912 if (has_in7_internal(config))
1910 sio_data->internal |= (1 << 1); 1913 sio_data->internal |= (1 << 1);
1911 1914
1912 /* in8 (Vbat) is always internal */ 1915 /* in8 (Vbat) is always internal */
@@ -1916,7 +1919,7 @@ static int __init it87_find(unsigned short *address,
1916 if (sio_data->type != it8603) 1919 if (sio_data->type != it8603)
1917 sio_data->skip_in |= (1 << 9); 1920 sio_data->skip_in |= (1 << 9);
1918 1921
1919 if (!(it87_devices[sio_data->type].features & FEAT_VID)) 1922 if (!has_vid(config))
1920 sio_data->skip_vid = 1; 1923 sio_data->skip_vid = 1;
1921 1924
1922 /* Read GPIO config and VID value from LDN 7 (GPIO) */ 1925 /* Read GPIO config and VID value from LDN 7 (GPIO) */