tslib: add patch to relax version check
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 3 Jan 2012 00:06:04 +0000 (02:06 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 3 Jan 2012 00:06:04 +0000 (02:06 +0200)
should make this compatible with newer kernels

recipes/tslib/tslib/fix_version_check_1.0.patch [new file with mode: 0644]
recipes/tslib/tslib_1.0.bb

diff --git a/recipes/tslib/tslib/fix_version_check_1.0.patch b/recipes/tslib/tslib/fix_version_check_1.0.patch
new file mode 100644 (file)
index 0000000..9fada0a
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urp tslib-1.0.orig/plugins/input-raw.c tslib-1.0/plugins/input-raw.c
+--- tslib-1.0.orig/plugins/input-raw.c 2006-08-25 00:02:54.000000000 +0300
++++ tslib-1.0/plugins/input-raw.c      2012-01-03 01:59:33.413515002 +0200
+@@ -52,7 +52,7 @@ static int check_fd(struct tslib_input *
+       u_int64_t absbit;
+       if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
+-              (version == EV_VERSION) &&
++              (version >= EV_VERSION) &&
+               (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) &&
+               (bit & (1 << EV_ABS)) &&
+               (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) &&
index 455953e..1e5a9fc 100644 (file)
@@ -6,9 +6,10 @@ SRC_URI = "http://download.berlios.de/tslib/${BP}.tar.bz2 \
            file://add_lowpass_plugin.patch;patch=1 \
            file://lowpass.c \
            file://no_double_up_event.patch;patch=1 \
+           file://fix_version_check_1.0.patch;patch=1 \
 "
 
-PR = "${INC_PR}.7"
+PR = "${INC_PR}.8"
 
 do_configure_prepend() {
        cp ${WORKDIR}/lowpass.c ${S}/plugins/