Commit 7fe7381c authored by Guenter Roeck's avatar Guenter Roeck

hwmon: (adc128d818) Drop write support on inX_input attributes

Writes into input registers doesn't make sense, even more so since
the writes actually ended up writing into the maximum limit registers.
Drop it.

Cc: stable@vger.kernel.org
Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent f6c2dd20
...@@ -239,50 +239,50 @@ static ssize_t adc128_show_alarm(struct device *dev, ...@@ -239,50 +239,50 @@ static ssize_t adc128_show_alarm(struct device *dev,
return sprintf(buf, "%u\n", !!(alarms & mask)); return sprintf(buf, "%u\n", !!(alarms & mask));
} }
static SENSOR_DEVICE_ATTR_2(in0_input, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in0_input, S_IRUGO,
adc128_show_in, adc128_set_in, 0, 0); adc128_show_in, NULL, 0, 0);
static SENSOR_DEVICE_ATTR_2(in0_min, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in0_min, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 0, 1); adc128_show_in, adc128_set_in, 0, 1);
static SENSOR_DEVICE_ATTR_2(in0_max, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in0_max, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 0, 2); adc128_show_in, adc128_set_in, 0, 2);
static SENSOR_DEVICE_ATTR_2(in1_input, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in1_input, S_IRUGO,
adc128_show_in, adc128_set_in, 1, 0); adc128_show_in, NULL, 1, 0);
static SENSOR_DEVICE_ATTR_2(in1_min, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in1_min, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 1, 1); adc128_show_in, adc128_set_in, 1, 1);
static SENSOR_DEVICE_ATTR_2(in1_max, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in1_max, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 1, 2); adc128_show_in, adc128_set_in, 1, 2);
static SENSOR_DEVICE_ATTR_2(in2_input, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in2_input, S_IRUGO,
adc128_show_in, adc128_set_in, 2, 0); adc128_show_in, NULL, 2, 0);
static SENSOR_DEVICE_ATTR_2(in2_min, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in2_min, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 2, 1); adc128_show_in, adc128_set_in, 2, 1);
static SENSOR_DEVICE_ATTR_2(in2_max, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in2_max, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 2, 2); adc128_show_in, adc128_set_in, 2, 2);
static SENSOR_DEVICE_ATTR_2(in3_input, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in3_input, S_IRUGO,
adc128_show_in, adc128_set_in, 3, 0); adc128_show_in, NULL, 3, 0);
static SENSOR_DEVICE_ATTR_2(in3_min, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in3_min, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 3, 1); adc128_show_in, adc128_set_in, 3, 1);
static SENSOR_DEVICE_ATTR_2(in3_max, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in3_max, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 3, 2); adc128_show_in, adc128_set_in, 3, 2);
static SENSOR_DEVICE_ATTR_2(in4_input, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in4_input, S_IRUGO,
adc128_show_in, adc128_set_in, 4, 0); adc128_show_in, NULL, 4, 0);
static SENSOR_DEVICE_ATTR_2(in4_min, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in4_min, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 4, 1); adc128_show_in, adc128_set_in, 4, 1);
static SENSOR_DEVICE_ATTR_2(in4_max, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in4_max, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 4, 2); adc128_show_in, adc128_set_in, 4, 2);
static SENSOR_DEVICE_ATTR_2(in5_input, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in5_input, S_IRUGO,
adc128_show_in, adc128_set_in, 5, 0); adc128_show_in, NULL, 5, 0);
static SENSOR_DEVICE_ATTR_2(in5_min, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in5_min, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 5, 1); adc128_show_in, adc128_set_in, 5, 1);
static SENSOR_DEVICE_ATTR_2(in5_max, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in5_max, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 5, 2); adc128_show_in, adc128_set_in, 5, 2);
static SENSOR_DEVICE_ATTR_2(in6_input, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in6_input, S_IRUGO,
adc128_show_in, adc128_set_in, 6, 0); adc128_show_in, NULL, 6, 0);
static SENSOR_DEVICE_ATTR_2(in6_min, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in6_min, S_IWUSR | S_IRUGO,
adc128_show_in, adc128_set_in, 6, 1); adc128_show_in, adc128_set_in, 6, 1);
static SENSOR_DEVICE_ATTR_2(in6_max, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR_2(in6_max, S_IWUSR | S_IRUGO,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment