diff options
author | Guenter Roeck <linux@roeck-us.net> | 2018-12-10 14:02:08 -0800 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-02-18 14:23:29 -0800 |
commit | 2f8f710236c9bd44fbed94f0b8dc306f350cbbef (patch) | |
tree | fe77844799043574284c3032e33a4200514fa3fb /drivers/hwmon/i5k_amb.c | |
parent | 12211301567138964d9cd4a26d5bcbd7bb480af1 (diff) |
hwmon: (i5k_amb) Replace S_<PERMS> with octal values
Replace S_<PERMS> with octal values.
The conversion was done automatically with coccinelle. The semantic patches
and the scripts used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches/hwmon/.
This patch does not introduce functional changes. It was verified by
compiling the old and new files and comparing text and data sizes.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/i5k_amb.c')
-rw-r--r-- | drivers/hwmon/i5k_amb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c index a4edc43dd060..2cf73d8eec1c 100644 --- a/drivers/hwmon/i5k_amb.c +++ b/drivers/hwmon/i5k_amb.c @@ -296,7 +296,7 @@ static int i5k_amb_hwmon_init(struct platform_device *pdev) snprintf(iattr->name, AMB_SYSFS_NAME_LEN, "temp%d_label", d); iattr->s_attr.dev_attr.attr.name = iattr->name; - iattr->s_attr.dev_attr.attr.mode = S_IRUGO; + iattr->s_attr.dev_attr.attr.mode = 0444; iattr->s_attr.dev_attr.show = show_label; iattr->s_attr.index = k; sysfs_attr_init(&iattr->s_attr.dev_attr.attr); @@ -311,7 +311,7 @@ static int i5k_amb_hwmon_init(struct platform_device *pdev) snprintf(iattr->name, AMB_SYSFS_NAME_LEN, "temp%d_input", d); iattr->s_attr.dev_attr.attr.name = iattr->name; - iattr->s_attr.dev_attr.attr.mode = S_IRUGO; + iattr->s_attr.dev_attr.attr.mode = 0444; iattr->s_attr.dev_attr.show = show_amb_temp; iattr->s_attr.index = k; sysfs_attr_init(&iattr->s_attr.dev_attr.attr); @@ -326,7 +326,7 @@ static int i5k_amb_hwmon_init(struct platform_device *pdev) snprintf(iattr->name, AMB_SYSFS_NAME_LEN, "temp%d_min", d); iattr->s_attr.dev_attr.attr.name = iattr->name; - iattr->s_attr.dev_attr.attr.mode = S_IWUSR | S_IRUGO; + iattr->s_attr.dev_attr.attr.mode = 0644; iattr->s_attr.dev_attr.show = show_amb_min; iattr->s_attr.dev_attr.store = store_amb_min; iattr->s_attr.index = k; @@ -342,7 +342,7 @@ static int i5k_amb_hwmon_init(struct platform_device *pdev) snprintf(iattr->name, AMB_SYSFS_NAME_LEN, "temp%d_mid", d); iattr->s_attr.dev_attr.attr.name = iattr->name; - iattr->s_attr.dev_attr.attr.mode = S_IWUSR | S_IRUGO; + iattr->s_attr.dev_attr.attr.mode = 0644; iattr->s_attr.dev_attr.show = show_amb_mid; iattr->s_attr.dev_attr.store = store_amb_mid; iattr->s_attr.index = k; @@ -358,7 +358,7 @@ static int i5k_amb_hwmon_init(struct platform_device *pdev) snprintf(iattr->name, AMB_SYSFS_NAME_LEN, "temp%d_max", d); iattr->s_attr.dev_attr.attr.name = iattr->name; - iattr->s_attr.dev_attr.attr.mode = S_IWUSR | S_IRUGO; + iattr->s_attr.dev_attr.attr.mode = 0644; iattr->s_attr.dev_attr.show = show_amb_max; iattr->s_attr.dev_attr.store = store_amb_max; iattr->s_attr.index = k; @@ -374,7 +374,7 @@ static int i5k_amb_hwmon_init(struct platform_device *pdev) snprintf(iattr->name, AMB_SYSFS_NAME_LEN, "temp%d_alarm", d); iattr->s_attr.dev_attr.attr.name = iattr->name; - iattr->s_attr.dev_attr.attr.mode = S_IRUGO; + iattr->s_attr.dev_attr.attr.mode = 0444; iattr->s_attr.dev_attr.show = show_amb_alarm; iattr->s_attr.index = k; sysfs_attr_init(&iattr->s_attr.dev_attr.attr); |