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

hwmon: (w83795) temp4_type has writable permission

Both datasheet and comments of store_temp_mode() tell us that temp1~4_type
is writable, so fix it.

Signed-off-by: Yao Wang <wangyao@lemote.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Fixes: 39deb6993e7c (" hwmon: (w83795) Simplify temperature sensor type handling")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Huacai Chen and committed by
Guenter Roeck
09aaf681 243cfe3f

+1 -1
+1 -1
drivers/hwmon/w83795.c
··· 1691 1691 * somewhere else in the code 1692 1692 */ 1693 1693 #define SENSOR_ATTR_TEMP(index) { \ 1694 - SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \ 1694 + SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \ 1695 1695 show_temp_mode, store_temp_mode, NOT_USED, index - 1), \ 1696 1696 SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \ 1697 1697 NULL, TEMP_READ, index - 1), \