[oe-commits] org.oe.dev linux-gta01: add missing patch, make it build

mickeyl commit openembedded-commits at lists.openembedded.org
Fri Jun 22 04:35:14 UTC 2007


linux-gta01: add missing patch, make it build

Author: mickeyl at openembedded.org
Branch: org.openembedded.dev
Revision: 43f0162e257c27b3b68e689fc1e52fc7d296db3d
ViewMTN: http://monotone.openembedded.org/revision.psp?id=43f0162e257c27b3b68e689fc1e52fc7d296db3d
Files:
1
packages/linux/linux-gta01/fix-EVIOCGRAB-semantics.patch
packages/linux/linux-gta01.inc
Diffs:

#
# mt diff -r090ae6ced13cea1936f2f3fd3ec1364f9a1bc2d1 -r43f0162e257c27b3b68e689fc1e52fc7d296db3d
#
# 
# 
# add_file "packages/linux/linux-gta01/fix-EVIOCGRAB-semantics.patch"
#  content [e15e615874c119de71e9a1862f9989a3d51c3285]
# 
# patch "packages/linux/linux-gta01.inc"
#  from [7f71764471bd651438dce3f94f56a85f1e3e345d]
#    to [3a7770395578a216ea4cae48cbad1a35cdcb367e]
# 
============================================================
--- packages/linux/linux-gta01/fix-EVIOCGRAB-semantics.patch	e15e615874c119de71e9a1862f9989a3d51c3285
+++ packages/linux/linux-gta01/fix-EVIOCGRAB-semantics.patch	e15e615874c119de71e9a1862f9989a3d51c3285
@@ -0,0 +1,97 @@
+diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
+index 12c7ab8..c7e741b 100644
+--- a/drivers/input/evdev.c
++++ b/drivers/input/evdev.c
+@@ -29,7 +29,7 @@ struct evdev {
+ 	char name[16];
+ 	struct input_handle handle;
+ 	wait_queue_head_t wait;
+-	struct evdev_list *grab;
++	int grab;
+ 	struct list_head list;
+ };
+ 
+@@ -37,6 +37,7 @@ struct evdev_list {
+ 	struct input_event buffer[EVDEV_BUFFER_SIZE];
+ 	int head;
+ 	int tail;
++	int grab;
+ 	struct fasync_struct *fasync;
+ 	struct evdev *evdev;
+ 	struct list_head node;
+@@ -49,8 +50,7 @@ static void evdev_event(struct input_han
+ 	struct evdev *evdev = handle->private;
+ 	struct evdev_list *list;
+ 
+-	if (evdev->grab) {
+-		list = evdev->grab;
++	list_for_each_entry(list, &evdev->list, node) {
+ 
+ 		do_gettimeofday(&list->buffer[list->head].time);
+ 		list->buffer[list->head].type = type;
+@@ -59,17 +59,7 @@ static void evdev_event(struct input_han
+ 		list->head = (list->head + 1) & (EVDEV_BUFFER_SIZE - 1);
+ 
+ 		kill_fasync(&list->fasync, SIGIO, POLL_IN);
+-	} else
+-		list_for_each_entry(list, &evdev->list, node) {
+-
+-			do_gettimeofday(&list->buffer[list->head].time);
+-			list->buffer[list->head].type = type;
+-			list->buffer[list->head].code = code;
+-			list->buffer[list->head].value = value;
+-			list->head = (list->head + 1) & (EVDEV_BUFFER_SIZE - 1);
+-
+-			kill_fasync(&list->fasync, SIGIO, POLL_IN);
+-		}
++	}
+ 
+ 	wake_up_interruptible(&evdev->wait);
+ }
+@@ -104,9 +94,10 @@ static int evdev_release(struct inode * 
+ {
+ 	struct evdev_list *list = file->private_data;
+ 
+-	if (list->evdev->grab == list) {
+-		input_release_device(&list->evdev->handle);
+-		list->evdev->grab = NULL;
++	if (list->grab) {
++		if(!--list->evdev->grab && list->evdev->exist)
++			input_release_device(&list->evdev->handle);
++		list->grab = 0;
+ 	}
+ 
+ 	evdev_fasync(-1, file, 0);
+@@ -483,17 +474,19 @@ static long evdev_ioctl_handler(struct f
+ 
+ 		case EVIOCGRAB:
+ 			if (p) {
+-				if (evdev->grab)
+-					return -EBUSY;
+-				if (input_grab_device(&evdev->handle))
++				if (list->grab)
+ 					return -EBUSY;
+-				evdev->grab = list;
++				if (!evdev->grab++)
++					if (input_grab_device(&evdev->handle))
++						return -EBUSY;
++				list->grab = 0;
+ 				return 0;
+ 			} else {
+-				if (evdev->grab != list)
++				if (!list->grab)
+ 					return -EINVAL;
+-				input_release_device(&evdev->handle);
+-				evdev->grab = NULL;
++				if (!--evdev->grab)
++					input_release_device(&evdev->handle);
++				list->grab = 0;
+ 				return 0;
+ 			}
+ 
+-
+To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+Please read the FAQ at  http://www.tux.org/lkml/
+
============================================================
--- packages/linux/linux-gta01.inc	7f71764471bd651438dce3f94f56a85f1e3e345d
+++ packages/linux/linux-gta01.inc	3a7770395578a216ea4cae48cbad1a35cdcb367e
@@ -89,7 +89,7 @@ do_deploy() {
 	install -d ${DEPLOY_DIR_IMAGE}
 	install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}.bin
 	tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib
-	arm-linux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin
+	${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
 	rm -f linux.bin.gz
 	gzip -9 linux.bin
 	${STAGING_BINDIR_NATIVE}/uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin






More information about the Openembedded-commits mailing list