diff options
author | Guenter Roeck <linux@roeck-us.net> | 2018-12-10 14:02:17 -0800 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-02-18 14:23:29 -0800 |
commit | e590be4ab142062b910e1f9138671f9ca7dee0bd (patch) | |
tree | b96728817a500b331e5f9b0c79833784a91d0f32 /drivers/hwmon | |
parent | 6d190949821b837ab309c2ef4ed6de6b1768fad6 (diff) | |
download | linux-stable-e590be4ab142062b910e1f9138671f9ca7dee0bd.tar.gz linux-stable-e590be4ab142062b910e1f9138671f9ca7dee0bd.tar.bz2 linux-stable-e590be4ab142062b910e1f9138671f9ca7dee0bd.zip |
hwmon: (nct7904) 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')
-rw-r--r-- | drivers/hwmon/nct7904.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c index 7815ddf149f6..82c7de7b4639 100644 --- a/drivers/hwmon/nct7904.c +++ b/drivers/hwmon/nct7904.c @@ -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; } |