Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7dd62c01 authored by Azael Avalos's avatar Azael Avalos Committed by Darren Hart
Browse files

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: default avatarAzael Avalos <coproscefalo@gmail.com>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
parent a8820037
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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,