From: Qiao Zhou Date: Thu, 31 Oct 2013 01:36:50 +0000 (+0800) Subject: drivers: switch: remove S_IWUSR from dev_attr X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc66dee02dcd6ea774e3ed4ae32e88b0f3b4bee7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 --- diff --git a/drivers/switch/switch_class.c b/drivers/switch/switch_class.c index e05fc2591147..e373b625806e 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) {