summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorAzael Avalos <coproscefalo@gmail.com>2015-02-26 10:58:31 -0700
committerDarren Hart <dvhart@linux.intel.com>2015-05-11 10:38:22 -0700
commit7dd62c0178ceae1d2bf5d8b88941314ec6eeca0a (patch)
tree431c5b7f2ed51c1a8ed5d4db974df29c67c3e460 /drivers/platform
parenta882003714ec94a3108b47ea5c0cf2a6ec1f3e98 (diff)
downloadop-kernel-dev-7dd62c0178ceae1d2bf5d8b88941314ec6eeca0a.zip
op-kernel-dev-7dd62c0178ceae1d2bf5d8b88941314ec6eeca0a.tar.gz
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>
Diffstat (limited to 'drivers/platform')
-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 db6cc53..7f2afc6 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,
return count;
}
+static DEVICE_ATTR_RW(protection_level);
static ssize_t reset_protection_store(struct device *dev,
struct device_attribute *attr,
@@ -123,10 +124,7 @@ static ssize_t reset_protection_store(struct device *dev,
return count;
}
-
-static DEVICE_ATTR(protection_level, S_IRUGO | S_IWUSR,
- protection_level_show, protection_level_store);
-static DEVICE_ATTR(reset_protection, S_IWUSR, NULL, reset_protection_store);
+static DEVICE_ATTR_WO(reset_protection);
static struct attribute *haps_attributes[] = {
&dev_attr_protection_level.attr,
OpenPOWER on IntegriCloud