[PATCH 1/2] Do not require exact version of EVDEV protocol, we can work withother versions too.

From: Dmitry Torokhov
Date: Tue Jan 25 2011 - 01:06:10 EST


Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
input.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/input.c b/input.c
index 73d5df1..08f4046 100644
--- a/input.c
+++ b/input.c
@@ -101,9 +101,11 @@ int device_open(int nr, int verbose)
close(fd);
return -1;
}
- if (EV_VERSION != version) {
- fprintf(stderr, "protocol version mismatch (expected %d, got %d)\n",
- EV_VERSION, version);
+
+#define EVDEV_MIN_VERSION 0x10000
+ if (version < EVDEV_MIN_VERSION) {
+ fprintf(stderr, "protocol version mismatch (need at least %d, got %d)\n",
+ EVDEV_MIN_VERSION, version);
close(fd);
return -1;
}

--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/