hwmon: (nct7904) Replace S_<PERMS> with octal values
authorGuenter Roeck <linux@roeck-us.net>
Mon, 10 Dec 2018 22:02:17 +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/nct7904.c

index 7815ddf149f60864f83b0c51986dd252415eb7d1..82c7de7b4639675ce714126529e958501b931838 100644 (file)
@@ -182,7 +182,7 @@ static umode_t nct7904_fan_is_visible(const void *_data, u32 attr, int channel)
        const struct nct7904_data *data = _data;
 
        if (attr == hwmon_fan_input && data->fanin_mask & (1 << channel))
-               return S_IRUGO;
+               return 0444;
        return 0;
 }
 
@@ -225,7 +225,7 @@ static umode_t nct7904_in_is_visible(const void *_data, u32 attr, int channel)
 
        if (channel > 0 && attr == hwmon_in_input &&
            (data->vsen_mask & BIT(index)))
-               return S_IRUGO;
+               return 0444;
 
        return 0;
 }
@@ -260,10 +260,10 @@ static umode_t nct7904_temp_is_visible(const void *_data, u32 attr, int channel)
        if (attr == hwmon_temp_input) {
                if (channel == 0) {
                        if (data->vsen_mask & BIT(17))
-                               return S_IRUGO;
+                               return 0444;
                } else {
                        if (data->tcpu_mask & BIT(channel - 1))
-                               return S_IRUGO;
+                               return 0444;
                }
        }
 
@@ -325,7 +325,7 @@ static umode_t nct7904_pwm_is_visible(const void *_data, u32 attr, int channel)
        switch (attr) {
        case hwmon_pwm_input:
        case hwmon_pwm_enable:
-               return S_IRUGO | S_IWUSR;
+               return 0644;
        default:
                return 0;
        }