Skip to contentSkip to conversation

HID: wacom - Add default permission defines for sysfs attributes

PATCH Superseded Ping Cheng 2 participants 2 messages Sep 10, 2014

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ping Cheng

author
#0 lore raw

PATCH 1/4 HID: wacom - Add default permission defines for sysfs attributes

RW : ug=rw,o=r
WO : ug=w

---
 drivers/hid/wacom_sys.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/hid/wacom_sys.c +3 -0
index f0db7ec..2ce102b 100644
@@ -23,6 +23,9 @@
 #define WAC_CMD_ICON_BT_XFER	0x26
 #define WAC_CMD_RETRIES		10
 
+#define DEV_ATTR_RW_PERM (S_IRUGO | S_IWUSR | S_IWGRP)
+#define DEV_ATTR_WO_PERM (S_IWUSR | S_IWGRP)
+
 static int wacom_get_report(struct hid_device *hdev, u8 type, u8 id,
 			    void *buf, size_t size, unsigned int retries)
 {
Signature · 1 line
1.9.1
#1 lore raw
Quoted 15 lines · Ping Cheng

RW : ug=rw,o=r
WO : ug=w

---
 drivers/hid/wacom_sys.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/hid/wacom_sys.c +0 -0
index f0db7ec..2ce102b 100644

drivers/hid/wacom_sys.c line 28

Quoted 6 lines
drivers/hid/wacom_sys.c +3 -0
@@ -23,6 +23,9 @@
 #define WAC_CMD_ICON_BT_XFER   0x26
 #define WAC_CMD_RETRIES                10
 
+#define DEV_ATTR_RW_PERM (S_IRUGO | S_IWUSR | S_IWGRP)
+#define DEV_ATTR_WO_PERM (S_IWUSR | S_IWGRP)
+

I guess you missed the correct split with 2/4 :) Please also add in this patch where these defines are used.

Cheers,
Benjamin

Quoted 10 lines
drivers/hid/wacom_sys.c +0 -1
 static int wacom_get_report(struct hid_device *hdev, u8 type, u8 id,
                            void *buf, size_t size, unsigned int retries)
 {
--

1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html