aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAzael Avalos <coproscefalo@gmail.com>2015-02-26 12:58:31 -0500
committerDarren Hart <dvhart@linux.intel.com>2015-05-11 13:38:22 -0400
commit7dd62c0178ceae1d2bf5d8b88941314ec6eeca0a (patch)
tree431c5b7f2ed51c1a8ed5d4db974df29c67c3e460
parenta882003714ec94a3108b47ea5c0cf2a6ec1f3e98 (diff)
toshiba_haps: Make use of DEVICE_ATTR_{RW, WO} macros
This patch makes use of DEVICE_ATTR_{RW, WO} macros, simplifying device attributes creation. Signed-off-by: Azael Avalos <coproscefalo@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-rw-r--r--drivers/platform/x86/toshiba_haps.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/platform/x86/toshiba_haps.c b/drivers/platform/x86/toshiba_haps.c
index db6cc53f8c55..7f2afc6b5eb9 100644
--- a/drivers/platform/x86/toshiba_haps.c
+++ b/drivers/platform/x86/toshiba_haps.c
@@ -100,6 +100,7 @@ static ssize_t protection_level_store(struct device *dev,
100 100
101 return count; 101 return count;
102} 102}
103static DEVICE_ATTR_RW(protection_level);
103 104
104static ssize_t reset_protection_store(struct device *dev, 105static ssize_t reset_protection_store(struct device *dev,
105 struct device_attribute *attr, 106 struct device_attribute *attr,
@@ -123,10 +124,7 @@ static ssize_t reset_protection_store(struct device *dev,
123 124
124 return count; 125 return count;
125} 126}
126 127static DEVICE_ATTR_WO(reset_protection);
127static DEVICE_ATTR(protection_level, S_IRUGO | S_IWUSR,
128 protection_level_show, protection_level_store);
129static DEVICE_ATTR(reset_protection, S_IWUSR, NULL, reset_protection_store);
130 128
131static struct attribute *haps_attributes[] = { 129static struct attribute *haps_attributes[] = {
132 &dev_attr_protection_level.attr, 130 &dev_attr_protection_level.attr,