[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180723131954.30739-4-harshitjain6751@gmail.com>
Date: Mon, 23 Jul 2018 18:49:20 +0530
From: dev-harsh1998 <harshitjain6751@...il.com>
To: trivial@...nel.org
Cc: Harshit Jain <harshitjain6751@...il.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Simon Budig <simon.budig@...nelconcepts.de>,
Andi Shyti <andi@...zian.org>,
Luca Ceresoli <luca@...aceresoli.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joe Perches <joe@...ches.com>,
Guenter Roeck <linux@...ck-us.net>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 05/11] touchscreen: elants: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL);
WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'.
+static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw)
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
+ .dattr = __ATTR(_field, S_IRUGO, \
Signed-off-by: Harshit Jain <harshitjain6751@...il.com>
---
drivers/input/touchscreen/elants_i2c.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index d21ca39b0fdb..9717b7c3bb6f 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -1000,8 +1000,8 @@ static ssize_t show_iap_mode(struct device *dev,
}
static DEVICE_ATTR_WO(calibrate);
-static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL);
-static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw);
+static DEVICE_ATTR(iap_mode, 0444, show_iap_mode, NULL);
+static DEVICE_ATTR(update_fw, 0200, NULL, write_update_fw);
struct elants_version_attribute {
struct device_attribute dattr;
@@ -1016,7 +1016,7 @@ struct elants_version_attribute {
__ELANTS_FIELD_SIZE(_field))
#define ELANTS_VERSION_ATTR(_field) \
struct elants_version_attribute elants_ver_attr_##_field = { \
- .dattr = __ATTR(_field, S_IRUGO, \
+ .dattr = __ATTR(_field, 0444, \
elants_version_attribute_show, NULL), \
.field_offset = offsetof(struct elants_data, _field), \
.field_size = __ELANTS_VERIFY_SIZE(_field), \
--
2.17.1
Powered by blists - more mailing lists