]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
hwmon: (jc42) Replace S_<PERMS> with octal values
authorGuenter Roeck <linux@roeck-us.net>
Mon, 10 Dec 2018 22:02:10 +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/jc42.c

index e5234f953a6d16213920df252ac8ef23d857f924..4fa482ae0eb50fb1269a8450abe1c25c90d3962b 100644 (file)
@@ -390,21 +390,21 @@ static umode_t jc42_is_visible(const void *_data, enum hwmon_sensor_types type,
 {
        const struct jc42_data *data = _data;
        unsigned int config = data->config;
-       umode_t mode = S_IRUGO;
+       umode_t mode = 0444;
 
        switch (attr) {
        case hwmon_temp_min:
        case hwmon_temp_max:
                if (!(config & JC42_CFG_EVENT_LOCK))
-                       mode |= S_IWUSR;
+                       mode |= 0200;
                break;
        case hwmon_temp_crit:
                if (!(config & JC42_CFG_TCRIT_LOCK))
-                       mode |= S_IWUSR;
+                       mode |= 0200;
                break;
        case hwmon_temp_crit_hyst:
                if (!(config & (JC42_CFG_EVENT_LOCK | JC42_CFG_TCRIT_LOCK)))
-                       mode |= S_IWUSR;
+                       mode |= 0200;
                break;
        case hwmon_temp_input:
        case hwmon_temp_max_hyst: