From: Azael Avalos Date: Thu, 26 Feb 2015 17:58:31 +0000 (-0700) Subject: toshiba_haps: Make use of DEVICE_ATTR_{RW, WO} macros X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7dd62c0178ceae1d2bf5d8b88941314ec6eeca0a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Darren Hart --- 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, 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,