hwmon: (max31790) Replace S_<PERMS> with octal values
authorGuenter Roeck <linux@roeck-us.net>
Mon, 10 Dec 2018 22:02:16 +0000 (14:02 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 18 Feb 2019 22:23:29 +0000 (14:23 -0800)
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>
drivers/hwmon/max31790.c

index 281491cca5103ad4b82e2f2a52be6f2408262bdb..722bcbb9865a2a2a06263c09d837e7d1c0785b70 100644 (file)
@@ -252,12 +252,12 @@ static umode_t max31790_fan_is_visible(const void *_data, u32 attr, int channel)
        case hwmon_fan_fault:
                if (channel < NR_CHANNEL ||
                    (fan_config & MAX31790_FAN_CFG_TACH_INPUT))
-                       return S_IRUGO;
+                       return 0444;
                return 0;
        case hwmon_fan_target:
                if (channel < NR_CHANNEL &&
                    !(fan_config & MAX31790_FAN_CFG_TACH_INPUT))
-                       return S_IRUGO | S_IWUSR;
+                       return 0644;
                return 0;
        default:
                return 0;
@@ -353,7 +353,7 @@ static umode_t max31790_pwm_is_visible(const void *_data, u32 attr, int channel)
        case hwmon_pwm_input:
        case hwmon_pwm_enable:
                if (!(fan_config & MAX31790_FAN_CFG_TACH_INPUT))
-                       return S_IRUGO | S_IWUSR;
+                       return 0644;
                return 0;
        default:
                return 0;