Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+5 -2
+5 -2
drivers/hwmon/it87.c
··· 1821 1821 int err; 1822 1822 u16 chip_type; 1823 1823 const char *board_vendor, *board_name; 1824 + const struct it87_devices *config; 1824 1825 1825 1826 err = superio_enter(); 1826 1827 if (err) ··· 1906 1905 it87_devices[sio_data->type].suffix, 1907 1906 *address, sio_data->revision); 1908 1907 1908 + config = &it87_devices[sio_data->type]; 1909 + 1909 1910 /* in7 (VSB or VCCH5V) is always internal on some chips */ 1910 - if (it87_devices[sio_data->type].features & FEAT_IN7_INTERNAL) 1911 + if (has_in7_internal(config)) 1911 1912 sio_data->internal |= (1 << 1); 1912 1913 1913 1914 /* in8 (Vbat) is always internal */ ··· 1919 1916 if (sio_data->type != it8603) 1920 1917 sio_data->skip_in |= (1 << 9); 1921 1918 1922 - if (!(it87_devices[sio_data->type].features & FEAT_VID)) 1919 + if (!has_vid(config)) 1923 1920 sio_data->skip_vid = 1; 1924 1921 1925 1922 /* Read GPIO config and VID value from LDN 7 (GPIO) */