lkml.org 
[lkml]   [2019]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 35/37] mfd: intel_pmc_bxt: Use octal permissions in sysfs attributes
Date
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>
---
drivers/mfd/intel_pmc_bxt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/intel_pmc_bxt.c b/drivers/mfd/intel_pmc_bxt.c
index 850ed55deef0..1591e4ecf5e5 100644
--- a/drivers/mfd/intel_pmc_bxt.c
+++ b/drivers/mfd/intel_pmc_bxt.c
@@ -206,6 +206,7 @@ static ssize_t intel_pmc_simple_cmd_store(struct device *dev,
}
return (ssize_t)count;
}
+static DEVICE_ATTR(simplecmd, 0200, NULL, intel_pmc_simple_cmd_store);

static ssize_t intel_pmc_northpeak_store(struct device *dev,
struct device_attribute *attr,
@@ -231,9 +232,7 @@ static ssize_t intel_pmc_northpeak_store(struct device *dev,
}
return (ssize_t)count;
}
-
-static DEVICE_ATTR(simplecmd, S_IWUSR, NULL, intel_pmc_simple_cmd_store);
-static DEVICE_ATTR(northpeak, S_IWUSR, NULL, intel_pmc_northpeak_store);
+static DEVICE_ATTR(northpeak, 0200, NULL, intel_pmc_northpeak_store);

static struct attribute *intel_pmc_attrs[] = {
&dev_attr_northpeak.attr,
--
2.24.0
\
 
 \ /
  Last update: 2019-12-23 15:18    [W:0.143 / U:8.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site