diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-05-12 14:10:56 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2014-05-21 19:02:24 -0400 |
commit | 84899d394e755989a1cc080083080f7695c36467 (patch) | |
tree | 0a7c3e8ea182b8c23c1b4599d55117b8a1c5eefc /drivers/hwmon/emc1403.c | |
parent | 03f49f641ab70b2ceea674e666f5b933e3bc5d27 (diff) |
hwmon: (emc1403) Make all hyst attributes except for temp1_crit_hyst read-only
All chips in this chip series only support a single hysteresis value. Having
multiple writable hysteresis attributes is therefore confusing, since a single
write affects all hysteresis temperatures. Make all but one (temp1_crit_hyst)
read-only.
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/emc1403.c')
-rw-r--r-- | drivers/hwmon/emc1403.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c index f76e5503b89a..46220b131153 100644 --- a/drivers/hwmon/emc1403.c +++ b/drivers/hwmon/emc1403.c | |||
@@ -195,8 +195,7 @@ static SENSOR_DEVICE_ATTR_2(temp2_max_alarm, S_IRUGO, | |||
195 | show_bit, NULL, 0x35, 0x02); | 195 | show_bit, NULL, 0x35, 0x02); |
196 | static SENSOR_DEVICE_ATTR_2(temp2_crit_alarm, S_IRUGO, | 196 | static SENSOR_DEVICE_ATTR_2(temp2_crit_alarm, S_IRUGO, |
197 | show_bit, NULL, 0x37, 0x02); | 197 | show_bit, NULL, 0x37, 0x02); |
198 | static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO | S_IWUSR, | 198 | static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO, show_hyst, NULL, 0x19); |
199 | show_hyst, store_hyst, 0x19); | ||
200 | 199 | ||
201 | static SENSOR_DEVICE_ATTR(temp3_min, S_IRUGO | S_IWUSR, | 200 | static SENSOR_DEVICE_ATTR(temp3_min, S_IRUGO | S_IWUSR, |
202 | show_temp, store_temp, 0x16); | 201 | show_temp, store_temp, 0x16); |
@@ -212,8 +211,7 @@ static SENSOR_DEVICE_ATTR_2(temp3_max_alarm, S_IRUGO, | |||
212 | show_bit, NULL, 0x35, 0x04); | 211 | show_bit, NULL, 0x35, 0x04); |
213 | static SENSOR_DEVICE_ATTR_2(temp3_crit_alarm, S_IRUGO, | 212 | static SENSOR_DEVICE_ATTR_2(temp3_crit_alarm, S_IRUGO, |
214 | show_bit, NULL, 0x37, 0x04); | 213 | show_bit, NULL, 0x37, 0x04); |
215 | static SENSOR_DEVICE_ATTR(temp3_crit_hyst, S_IRUGO | S_IWUSR, | 214 | static SENSOR_DEVICE_ATTR(temp3_crit_hyst, S_IRUGO, show_hyst, NULL, 0x1A); |
216 | show_hyst, store_hyst, 0x1A); | ||
217 | 215 | ||
218 | static SENSOR_DEVICE_ATTR(temp4_min, S_IRUGO | S_IWUSR, | 216 | static SENSOR_DEVICE_ATTR(temp4_min, S_IRUGO | S_IWUSR, |
219 | show_temp, store_temp, 0x2D); | 217 | show_temp, store_temp, 0x2D); |
@@ -229,8 +227,7 @@ static SENSOR_DEVICE_ATTR_2(temp4_max_alarm, S_IRUGO, | |||
229 | show_bit, NULL, 0x35, 0x08); | 227 | show_bit, NULL, 0x35, 0x08); |
230 | static SENSOR_DEVICE_ATTR_2(temp4_crit_alarm, S_IRUGO, | 228 | static SENSOR_DEVICE_ATTR_2(temp4_crit_alarm, S_IRUGO, |
231 | show_bit, NULL, 0x37, 0x08); | 229 | show_bit, NULL, 0x37, 0x08); |
232 | static SENSOR_DEVICE_ATTR(temp4_crit_hyst, S_IRUGO | S_IWUSR, | 230 | static SENSOR_DEVICE_ATTR(temp4_crit_hyst, S_IRUGO, show_hyst, NULL, 0x30); |
233 | show_hyst, store_hyst, 0x30); | ||
234 | 231 | ||
235 | static SENSOR_DEVICE_ATTR_2(power_state, S_IRUGO | S_IWUSR, | 232 | static SENSOR_DEVICE_ATTR_2(power_state, S_IRUGO | S_IWUSR, |
236 | show_bit, store_bit, 0x03, 0x40); | 233 | show_bit, store_bit, 0x03, 0x40); |