[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180721191029.25658-2-harshitjain6751@gmail.com>
Date: Sun, 22 Jul 2018 00:39:43 +0530
From: dev-harsh1998 <harshitjain6751@...il.com>
To: trivial@...nel.org
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Andi Shyti <andi@...zian.org>,
Simon Budig <simon.budig@...nelconcepts.de>,
Luca Ceresoli <luca@...aceresoli.net>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 03/11] touchscreen: ad7846: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL);
Signed-off-by: dev-harsh1998 <harshitjain6751@...il.com>
---
drivers/input/touchscreen/ads7846.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index a2f45aefce08..7c07de0802de 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -431,7 +431,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \
return v; \
return sprintf(buf, "%u\n", adjust(ts, v)); \
} \
-static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL);
+static DEVICE_ATTR(name, 0444, name ## _show, NULL);
/* Sysfs conventions report temperatures in millidegrees Celsius.
@@ -561,7 +561,7 @@ static ssize_t ads7846_pen_down_show(struct device *dev,
return sprintf(buf, "%u\n", ts->pendown);
}
-static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL);
+static DEVICE_ATTR(pen_down, 0444, ads7846_pen_down_show, NULL);
static ssize_t ads7846_disable_show(struct device *dev,
struct device_attribute *attr, char *buf)
--
2.17.1
Powered by blists - more mailing lists