aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiao Zhou <zhouqiao@marvell.com>2013-10-31 09:36:50 +0800
committerColin Cross <ccross@android.com>2014-03-19 13:10:38 -0700
commit1cdf498a7ed4de1bce31fb80b3b4c7814e31b7f4 (patch)
treeb4a68425794ff0c8d31523262955e7c82f237b9e
parent9a6b71f160d321198bca9454a624173d08d7c5be (diff)
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: Qiao Zhou <zhouqiao@marvell.com>
-rw-r--r--drivers/switch/switch_class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/switch/switch_class.c b/drivers/switch/switch_class.c
index e05fc259114..e373b625806 100644
--- a/drivers/switch/switch_class.c
+++ b/drivers/switch/switch_class.c
@@ -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)
{