Patchwork [14/16] Add udev patch to compile against newer kernels

login
register
mail settings
Submitter Matthew McClintock
Date Sept. 29, 2011, 4:21 a.m.
Message ID <1317270070-14250-14-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/12389/
State New, archived
Headers show

Comments

Matthew McClintock - Sept. 29, 2011, 4:21 a.m.
This patch is needed to compile against newer kernels which have
changed their API

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 meta/recipes-core/udev/files/udev-166-v4l1-1.patch |   50 ++++++++++++++++++++
 meta/recipes-core/udev/udev_164.bb                 |    4 +-
 2 files changed, 53 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/udev/files/udev-166-v4l1-1.patch

Patch

diff --git a/meta/recipes-core/udev/files/udev-166-v4l1-1.patch b/meta/recipes-core/udev/files/udev-166-v4l1-1.patch
new file mode 100644
index 0000000..2086fe1
--- /dev/null
+++ b/meta/recipes-core/udev/files/udev-166-v4l1-1.patch
@@ -0,0 +1,50 @@ 
+Upstream-Status: Backport
+
+Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
+Date:                    2011-03-26
+Initial Package Version: 166
+Upstream Status:         From upstream
+Origin:                  http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=4ace8a43ac2cbbd4d6f5c29fc461c3caa8f8545b
+Description:             Fixes a compilation error caused by the removal of the
+                         Video for Linux 1 API from Linux kernels from 2.6.38
+                         onwards.
+
+diff -Naur udev-166.orig/extras/v4l_id/v4l_id.c udev-166/extras/v4l_id/v4l_id.c
+--- udev-166.orig/extras/v4l_id/v4l_id.c	2009-12-03 12:45:03.000000000 +0000
++++ udev-166/extras/v4l_id/v4l_id.c	2011-03-25 20:26:33.000000000 +0000
+@@ -28,7 +28,6 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
+-#include <linux/videodev.h>
+ #include <linux/videodev2.h>
+ 
+ int main (int argc, char *argv[])
+@@ -39,7 +38,6 @@
+ 	};
+ 	int fd;
+ 	char *device;
+-	struct video_capability v1cap;
+ 	struct v4l2_capability v2cap;
+ 
+ 	while (1) {
+@@ -82,19 +80,6 @@
+ 		if ((v2cap.capabilities & V4L2_CAP_RADIO) > 0)
+ 			printf("radio:");
+ 		printf("\n");
+-	} else if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) {
+-		printf("ID_V4L_VERSION=1\n");
+-		printf("ID_V4L_PRODUCT=%s\n", v1cap.name);
+-		printf("ID_V4L_CAPABILITIES=:");
+-		if ((v1cap.type & VID_TYPE_CAPTURE) > 0)
+-			printf("capture:");
+-		if ((v1cap.type & VID_TYPE_OVERLAY) > 0)
+-			printf("video_overlay:");
+-		if (v1cap.audios > 0)
+-			printf("audio:");
+-		if ((v1cap.type & VID_TYPE_TUNER) > 0)
+-			printf("tuner:");
+-		printf("\n");
+ 	}
+ 
+ 	close (fd);
diff --git a/meta/recipes-core/udev/udev_164.bb b/meta/recipes-core/udev/udev_164.bb
index 567e62e..f20da27 100644
--- a/meta/recipes-core/udev/udev_164.bb
+++ b/meta/recipes-core/udev/udev_164.bb
@@ -1,6 +1,8 @@ 
 include udev-new.inc
 
-PR = "r3"
+PR = "r4"
+
+SRC_URI += "file://udev-166-v4l1-1.patch"
 
 SRC_URI[md5sum] = "fddac2d54761ea34865af9467377ca9f"
 SRC_URI[sha256sum] = "c12e66280b5e1465f6587a8cfa47d7405c4caa7e52ce5dd13478d04f6ec05e5c"