Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Azael Avalos and committed by
Darren Hart
7dd62c01 a8820037

+2 -4
+2 -4
drivers/platform/x86/toshiba_haps.c
··· 100 100 101 101 return count; 102 102 } 103 + static DEVICE_ATTR_RW(protection_level); 103 104 104 105 static ssize_t reset_protection_store(struct device *dev, 105 106 struct device_attribute *attr, ··· 124 123 125 124 return count; 126 125 } 127 - 128 - static DEVICE_ATTR(protection_level, S_IRUGO | S_IWUSR, 129 - protection_level_show, protection_level_store); 130 - static DEVICE_ATTR(reset_protection, S_IWUSR, NULL, reset_protection_store); 126 + static DEVICE_ATTR_WO(reset_protection); 131 127 132 128 static struct attribute *haps_attributes[] = { 133 129 &dev_attr_protection_level.attr,