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

Commit dc66dee0 authored by Qiao Zhou's avatar Qiao Zhou Committed by John Stultz
Browse files

drivers: switch: remove S_IWUSR from dev_attr



it doesn't need S_IWUSR attribute since xxx_store API is un-needed.
otherwise the WARN check in device_create_file will alert.

Change-Id: I6360bf022dcd659bfb3f41c84624f954d5d15ea5
Signed-off-by: default avatarQiao Zhou <zhouqiao@marvell.com>
parent 8e180508
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -54,8 +54,8 @@ static ssize_t name_show(struct device *dev, struct device_attribute *attr,
	return sprintf(buf, "%s\n", sdev->name);
}

static DEVICE_ATTR(state, S_IRUGO | S_IWUSR, state_show, NULL);
static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, name_show, NULL);
static DEVICE_ATTR(state, S_IRUGO, state_show, NULL);
static DEVICE_ATTR(name, S_IRUGO, name_show, NULL);

void switch_set_state(struct switch_dev *sdev, int state)
{