[Armadeus-commitlog] SF.net SVN: armadeus:[961] trunk/patches/ 062-buildroot-tslib-add_patch_to_mak
Brought to you by:
sszy
|
From: <ar...@us...> - 2008-12-16 18:51:46
|
Revision: 961
http://armadeus.svn.sourceforge.net/armadeus/?rev=961&view=rev
Author: artemys
Date: 2008-12-16 18:51:42 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
[BUILDROOT] Makes tslib work with recent kernel
Added Paths:
-----------
trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff
Added: trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff
===================================================================
--- trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff (rev 0)
+++ trunk/patches/062-buildroot-tslib-add_patch_to_make_it_work_on_powerpc_and_recent_kernels.diff 2008-12-16 18:51:42 UTC (rev 961)
@@ -0,0 +1,51 @@
+--- /dev/null 1970-01-01 01:00:00.000000000 +0100
++++ buildroot/package/tslib/tslib-1.0-zz-make_it_work_on_powerpc_and_recent_kernels.patch 2008-12-16 18:03:50.000000000 +0100
+@@ -0,0 +1,48 @@
++The bit / absbit is defined the same way as in kernel. {EV|ABS}_CNT is
++only exported in recent kernels.
++
++Signed-off-by: Sebastian Siewior <seb...@br...>
++
++
++--- tslib-1.0.org/plugins/input-raw.c 2008-11-18 11:38:02.000000000 +0100
+++++ tslib-1.0/plugins/input-raw.c 2008-11-18 11:44:10.000000000 +0100
++@@ -44,23 +44,31 @@
++ int using_syn;
++ };
++
+++#define BITS_PER_LONG (sizeof(long) * 8)
+++#ifndef EV_CNT
+++#define EV_CNT (EV_MAX+1)
+++#endif
+++#ifndef ABS_CNT
+++#define ABS_CNT (ABS_MAX+1)
+++#endif
+++
++ static int check_fd(struct tslib_input *i)
++ {
++ struct tsdev *ts = i->module.dev;
++ int version;
++- u_int32_t bit;
++- u_int32_t absbit;
+++ unsigned long bit[EV_CNT / BITS_PER_LONG + 1];
+++ unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1];
++
++ if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
++ (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) &&
++- (absbit & (1 << ABS_X)) &&
++- (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) {
+++ (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) &&
+++ (bit[0] & (1 << EV_ABS)) &&
+++ (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) &&
+++ (absbit[0] & (1 << ABS_X)) &&
+++ (absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) {
++ }
++
++- if (bit & (1 << EV_SYN))
+++ if (bit[0] & (1 << EV_SYN))
++ i->using_syn = 1;
++
++ return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|