]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
platform/x86: intel_pmc_ipc: Use octal permissions in sysfs attributes
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 22 Jan 2020 16:46:17 +0000 (19:46 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 22 Jan 2020 16:52:27 +0000 (18:52 +0200)
This is the current preferred way so replace the S_IWUSR with the
corresponding octal value. While there move the attributes to follow
directly their store functions.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_pmc_ipc.c

index 8527327d88c7606206a0112aee1079680e8f11d2..b87036089a541358a4d5f696f69fe31780595809 100644 (file)
@@ -502,6 +502,7 @@ static ssize_t intel_pmc_ipc_simple_cmd_store(struct device *dev,
        }
        return (ssize_t)count;
 }
+static DEVICE_ATTR(simplecmd, 0200, NULL, intel_pmc_ipc_simple_cmd_store);
 
 static ssize_t intel_pmc_ipc_northpeak_store(struct device *dev,
                                             struct device_attribute *attr,
@@ -525,11 +526,7 @@ static ssize_t intel_pmc_ipc_northpeak_store(struct device *dev,
        }
        return (ssize_t)count;
 }
-
-static DEVICE_ATTR(simplecmd, S_IWUSR,
-                  NULL, intel_pmc_ipc_simple_cmd_store);
-static DEVICE_ATTR(northpeak, S_IWUSR,
-                  NULL, intel_pmc_ipc_northpeak_store);
+static DEVICE_ATTR(northpeak, 0200, NULL, intel_pmc_ipc_northpeak_store);
 
 static struct attribute *intel_ipc_attrs[] = {
        &dev_attr_northpeak.attr,