[PATCH libevdev 1/2] include: update linux/input.h for kernel 3.12
Peter Hutterer
peter.hutterer at who-t.net
Tue Jan 7 17:28:36 PST 2014
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
include/linux/input.h | 3 +++
libevdev/make-event-names.py | 4 ----
test/test-event-names.c | 3 +--
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/include/linux/input.h b/include/linux/input.h
index 38fe79f..ba88cec 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -150,6 +150,7 @@ struct input_keymap_entry {
#define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */
#define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */
+#define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */
#define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */
@@ -192,6 +193,8 @@ struct input_keymap_entry {
#define SYN_CONFIG 1
#define SYN_MT_REPORT 2
#define SYN_DROPPED 3
+#define SYN_MAX 0xf
+#define SYN_CNT (SYN_MAX+1)
/*
* Keys and buttons
diff --git a/libevdev/make-event-names.py b/libevdev/make-event-names.py
index 8f65ab8..0dea9d6 100755
--- a/libevdev/make-event-names.py
+++ b/libevdev/make-event-names.py
@@ -157,10 +157,6 @@ def print_mapping_table(bits):
print("#ifndef EVENT_NAMES_H")
print("#define EVENT_NAMES_H")
print("")
- print("#ifndef SYN_MAX /* added in 3.12 */")
- print("#define SYN_MAX 0xf")
- print("#endif")
- print("")
for prefix in prefixes:
if prefix == "BTN_":
diff --git a/test/test-event-names.c b/test/test-event-names.c
index 9aa3dfb..903e152 100644
--- a/test/test-event-names.c
+++ b/test/test-event-names.c
@@ -190,8 +190,7 @@ START_TEST(test_code_syn_name)
ck_assert_str_eq(libevdev_event_code_get_name(EV_SYN, SYN_CONFIG), "SYN_CONFIG");
ck_assert_str_eq(libevdev_event_code_get_name(EV_SYN, SYN_MT_REPORT), "SYN_MT_REPORT");
ck_assert_str_eq(libevdev_event_code_get_name(EV_SYN, SYN_DROPPED), "SYN_DROPPED");
-
- /* there is no SYN_MAX */
+ ck_assert_str_eq(libevdev_event_code_get_name(EV_SYN, SYN_MAX), "SYN_MAX");
}
END_TEST
--
1.8.4.2
More information about the Input-tools
mailing list