[oe-commits] org.oe.dev linux-gta01_2.6.22.5.bb: Modify fix-EVIOCGRAB-semantics patch for 2.6.22 and
daniel commit
openembedded-commits at lists.openembedded.org
Wed Aug 29 18:10:49 UTC 2007
linux-gta01_2.6.22.5.bb: Modify fix-EVIOCGRAB-semantics patch for 2.6.22 and
enable it again.
Author: daniel at openembedded.org
Branch: org.openembedded.dev
Revision: 324c11ddb442f19bd1e4d37d80db586af377552e
ViewMTN: http://monotone.openembedded.org/revision.psp?id=324c11ddb442f19bd1e4d37d80db586af377552e
Files:
1
packages/linux/linux-gta01/fix-EVIOCGRAB-semantics-2.6.22.5.patch
packages/linux/linux-gta01_2.6.22.5.bb
Diffs:
#
# mt diff -re6dba568668063d79e9f4d1843c87e113ea51be3 -r324c11ddb442f19bd1e4d37d80db586af377552e
#
#
#
# add_file "packages/linux/linux-gta01/fix-EVIOCGRAB-semantics-2.6.22.5.patch"
# content [aad1fad01b6ce0e521a45dad330521825ac0903f]
#
# patch "packages/linux/linux-gta01_2.6.22.5.bb"
# from [ef0f1c24d6a7f6f65653201f99d3cd5c60bbe2ee]
# to [73a688164c1e7a63c8c5d590f6d406c88f38d1d4]
#
============================================================
--- packages/linux/linux-gta01/fix-EVIOCGRAB-semantics-2.6.22.5.patch aad1fad01b6ce0e521a45dad330521825ac0903f
+++ packages/linux/linux-gta01/fix-EVIOCGRAB-semantics-2.6.22.5.patch aad1fad01b6ce0e521a45dad330521825ac0903f
@@ -0,0 +1,91 @@
+Index: linux-2.6.22.5/drivers/input/evdev.c
+===================================================================
+--- linux-2.6.22.5.orig/drivers/input/evdev.c
++++ linux-2.6.22.5/drivers/input/evdev.c
+@@ -28,7 +28,7 @@ struct evdev {
+ char name[16];
+ struct input_handle handle;
+ wait_queue_head_t wait;
+- struct evdev_client *grab;
++ int grab;
+ struct list_head client_list;
+ };
+
+@@ -36,6 +36,7 @@ struct evdev_client {
+ struct input_event buffer[EVDEV_BUFFER_SIZE];
+ int head;
+ int tail;
++ int grab;
+ struct fasync_struct *fasync;
+ struct evdev *evdev;
+ struct list_head node;
+@@ -48,8 +49,7 @@ static void evdev_event(struct input_han
+ struct evdev *evdev = handle->private;
+ struct evdev_client *client;
+
+- if (evdev->grab) {
+- client = evdev->grab;
++ list_for_each_entry(client, &evdev->client_list, node) {
+
+ do_gettimeofday(&client->buffer[client->head].time);
+ client->buffer[client->head].type = type;
+@@ -58,17 +58,7 @@ static void evdev_event(struct input_han
+ client->head = (client->head + 1) & (EVDEV_BUFFER_SIZE - 1);
+
+ kill_fasync(&client->fasync, SIGIO, POLL_IN);
+- } else
+- list_for_each_entry(client, &evdev->client_list, node) {
+-
+- do_gettimeofday(&client->buffer[client->head].time);
+- client->buffer[client->head].type = type;
+- client->buffer[client->head].code = code;
+- client->buffer[client->head].value = value;
+- client->head = (client->head + 1) & (EVDEV_BUFFER_SIZE - 1);
+-
+- kill_fasync(&client->fasync, SIGIO, POLL_IN);
+- }
++ }
+
+ wake_up_interruptible(&evdev->wait);
+ }
+@@ -105,9 +95,10 @@ static int evdev_release(struct inode *i
+ struct evdev_client *client = file->private_data;
+ struct evdev *evdev = client->evdev;
+
+- if (evdev->grab == client) {
+- input_release_device(&evdev->handle);
+- evdev->grab = NULL;
++ if (client->grab) {
++ if(!--evdev->grab && evdev->exist)
++ input_release_device(&evdev->handle);
++ client->grab = 0;
+ }
+
+ evdev_fasync(-1, file, 0);
+@@ -488,17 +479,19 @@ static long evdev_ioctl_handler(struct f
+
+ case EVIOCGRAB:
+ if (p) {
+- if (evdev->grab)
+- return -EBUSY;
+- if (input_grab_device(&evdev->handle))
++ if (client->grab)
+ return -EBUSY;
+- evdev->grab = client;
++ if (!evdev->grab++)
++ if (input_grab_device(&evdev->handle))
++ return -EBUSY;
++ client->grab = 0;
+ return 0;
+ } else {
+- if (evdev->grab != client)
++ if (!client->grab)
+ return -EINVAL;
+- input_release_device(&evdev->handle);
+- evdev->grab = NULL;
++ if (!--evdev->grab)
++ input_release_device(&evdev->handle);
++ client->grab = 0;
+ return 0;
+ }
+
============================================================
--- packages/linux/linux-gta01_2.6.22.5.bb ef0f1c24d6a7f6f65653201f99d3cd5c60bbe2ee
+++ packages/linux/linux-gta01_2.6.22.5.bb 73a688164c1e7a63c8c5d590f6d406c88f38d1d4
@@ -1,10 +1,10 @@ SRC_URI += "svn://svn.openmoko.org/trunk
require linux-gta01.inc
SRC_URI += "svn://svn.openmoko.org/trunk/src/target/kernel;module=patches;proto=http"
-#SRC_URI += "file://fix-EVIOCGRAB-semantics.patch;patch=1"
+SRC_URI += "file://fix-EVIOCGRAB-semantics-2.6.22.5.patch;patch=1"
MOKOR = "moko11"
-PR = "${MOKOR}-r1"
+PR = "${MOKOR}-r2"
VANILLA_VERSION = "2.6.22.5"
More information about the Openembedded-commits
mailing list