diff options
author | Corentin Labbe <clabbe.montjoie@gmail.com> | 2019-01-18 15:03:25 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-02-18 14:23:29 -0800 |
commit | b6c6d0cf4837f12f5eef98531871c1efd5da562a (patch) | |
tree | 87930c7383e61aecb934d5589f53e6ffe3060d77 /drivers/hwmon/adm1029.c | |
parent | 4b4fb2542d716708fb81b47e8472a88005c89d99 (diff) | |
download | linux-b6c6d0cf4837f12f5eef98531871c1efd5da562a.tar.bz2 |
hwmon: (adm1029) replace S_IXXX macros by their numeric values
As requested by checkpatch, this patch replace S_IXXX macros by their numeric values.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/adm1029.c')
-rw-r--r-- | drivers/hwmon/adm1029.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index 381bfae6b04b..092f16ad774f 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -250,32 +250,27 @@ static ssize_t set_fan_div(struct device *dev, return count; } -/* - * Access rights on sysfs. S_IRUGO: Is Readable by User, Group and Others - * S_IWUSR: Is Writable by User. - */ -static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL, 0); -static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, show_temp, NULL, 1); -static SENSOR_DEVICE_ATTR(temp3_input, S_IRUGO, show_temp, NULL, 2); +/* Access rights on sysfs. */ +static SENSOR_DEVICE_ATTR(temp1_input, 0444, show_temp, NULL, 0); +static SENSOR_DEVICE_ATTR(temp2_input, 0444, show_temp, NULL, 1); +static SENSOR_DEVICE_ATTR(temp3_input, 0444, show_temp, NULL, 2); -static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, show_temp, NULL, 3); -static SENSOR_DEVICE_ATTR(temp2_max, S_IRUGO, show_temp, NULL, 4); -static SENSOR_DEVICE_ATTR(temp3_max, S_IRUGO, show_temp, NULL, 5); +static SENSOR_DEVICE_ATTR(temp1_max, 0444, show_temp, NULL, 3); +static SENSOR_DEVICE_ATTR(temp2_max, 0444, show_temp, NULL, 4); +static SENSOR_DEVICE_ATTR(temp3_max, 0444, show_temp, NULL, 5); -static SENSOR_DEVICE_ATTR(temp1_min, S_IRUGO, show_temp, NULL, 6); -static SENSOR_DEVICE_ATTR(temp2_min, S_IRUGO, show_temp, NULL, 7); -static SENSOR_DEVICE_ATTR(temp3_min, S_IRUGO, show_temp, NULL, 8); +static SENSOR_DEVICE_ATTR(temp1_min, 0444, show_temp, NULL, 6); +static SENSOR_DEVICE_ATTR(temp2_min, 0444, show_temp, NULL, 7); +static SENSOR_DEVICE_ATTR(temp3_min, 0444, show_temp, NULL, 8); -static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0); -static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1); +static SENSOR_DEVICE_ATTR(fan1_input, 0444, show_fan, NULL, 0); +static SENSOR_DEVICE_ATTR(fan2_input, 0444, show_fan, NULL, 1); -static SENSOR_DEVICE_ATTR(fan1_min, S_IRUGO, show_fan, NULL, 2); -static SENSOR_DEVICE_ATTR(fan2_min, S_IRUGO, show_fan, NULL, 3); +static SENSOR_DEVICE_ATTR(fan1_min, 0444, show_fan, NULL, 2); +static SENSOR_DEVICE_ATTR(fan2_min, 0444, show_fan, NULL, 3); -static SENSOR_DEVICE_ATTR(fan1_div, S_IRUGO | S_IWUSR, - show_fan_div, set_fan_div, 0); -static SENSOR_DEVICE_ATTR(fan2_div, S_IRUGO | S_IWUSR, - show_fan_div, set_fan_div, 1); +static SENSOR_DEVICE_ATTR(fan1_div, 0644, show_fan_div, set_fan_div, 0); +static SENSOR_DEVICE_ATTR(fan2_div, 0644, show_fan_div, set_fan_div, 1); static struct attribute *adm1029_attrs[] = { &sensor_dev_attr_temp1_input.dev_attr.attr, |