diff options
Diffstat (limited to 'meta/recipes-graphics/tslib/tslib/32bitBE-support.patch')
-rw-r--r-- | meta/recipes-graphics/tslib/tslib/32bitBE-support.patch | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch b/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch deleted file mode 100644 index 49232ef6e9..0000000000 --- a/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | #! /bin/sh /usr/share/dpatch/dpatch-run | ||
2 | ## 030-32bitBE-support.dpatch by Neil Williams <codehelp@debian.org> | ||
3 | ## | ||
4 | ## All lines beginning with `## DP:' are a description of the patch. | ||
5 | ## DP: See bug #496759 - being tested upstream for 32bit BE devices | ||
6 | |||
7 | @DPATCH@ | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | diff -urNad tslib-1.0~/plugins/input-raw.c tslib-1.0/plugins/input-raw.c | ||
12 | --- tslib-1.0~/plugins/input-raw.c 2008-12-09 10:56:47.000000000 +0000 | ||
13 | +++ tslib-1.0/plugins/input-raw.c 2008-12-09 11:05:41.000000000 +0000 | ||
14 | @@ -44,25 +44,33 @@ | ||
15 | int using_syn; | ||
16 | }; | ||
17 | |||
18 | +#define BITS_PER_LONG (sizeof(long) * 8) | ||
19 | +#ifndef EV_CNT | ||
20 | +#define EV_CNT (EV_MAX+1) | ||
21 | +#endif | ||
22 | +#ifndef ABS_CNT | ||
23 | +#define ABS_CNT (ABS_MAX+1) | ||
24 | +#endif | ||
25 | + | ||
26 | static int check_fd(struct tslib_input *i) | ||
27 | { | ||
28 | struct tsdev *ts = i->module.dev; | ||
29 | int version; | ||
30 | - u_int32_t bit; | ||
31 | - u_int64_t absbit; | ||
32 | + unsigned long bit[EV_CNT / BITS_PER_LONG + 1]; | ||
33 | + unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1]; | ||
34 | |||
35 | if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) && | ||
36 | (version == EV_VERSION) && | ||
37 | - (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) && | ||
38 | - (bit & (1 << EV_ABS)) && | ||
39 | - (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) && | ||
40 | - (absbit & (1 << ABS_X)) && | ||
41 | - (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) { | ||
42 | + (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) && | ||
43 | + (bit[0] & (1 << EV_ABS)) && | ||
44 | + (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) && | ||
45 | + (absbit[0] & (1 << ABS_X)) && | ||
46 | + (absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) { | ||
47 | fprintf(stderr, "selected device is not a touchscreen I understand\n"); | ||
48 | return -1; | ||
49 | } | ||
50 | |||
51 | - if (bit & (1 << EV_SYN)) | ||
52 | + if (bit[0] & (1 << EV_SYN)) | ||
53 | i->using_syn = 1; | ||
54 | |||
55 | return 0; | ||