summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83795.c
diff options
context:
space:
mode:
authorHuacai Chen2018-11-15 03:44:57 +0100
committerGuenter Roeck2018-11-18 23:34:56 +0100
commit09aaf6813cfca4c18034fda7a43e68763f34abb1 (patch)
treec075c41b129eead8d0a2e3d6a35a9f3002789a0b /drivers/hwmon/w83795.c
parenthwmon: (mlxreg-fan) Fix macros for tacho fault reading (diff)
downloadkernel-qcow2-linux-09aaf6813cfca4c18034fda7a43e68763f34abb1.tar.gz
kernel-qcow2-linux-09aaf6813cfca4c18034fda7a43e68763f34abb1.tar.xz
kernel-qcow2-linux-09aaf6813cfca4c18034fda7a43e68763f34abb1.zip
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>
Diffstat (limited to 'drivers/hwmon/w83795.c')
-rw-r--r--drivers/hwmon/w83795.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
index 49276bbdac3d..1bb80f992aa8 100644
--- a/drivers/hwmon/w83795.c
+++ b/drivers/hwmon/w83795.c
@@ -1691,7 +1691,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr,
* somewhere else in the code
*/
#define SENSOR_ATTR_TEMP(index) { \
- SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \
+ SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \
show_temp_mode, store_temp_mode, NOT_USED, index - 1), \
SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \
NULL, TEMP_READ, index - 1), \