Fix HAL on newer kernels without header file
(From OE-Core rev: 3d421ecaef966b47bec49aa2feb3ccc9833d041f) (From OE-Core rev: 4a6599a01a6dd2b856656d93e82f1411b7d352ed) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
f1f2cbbc0d
commit
ada8ebb116
|
@ -0,0 +1,60 @@
|
|||
Upstream-Status: Backport
|
||||
|
||||
From ae13d96fa2a0612b6000f4b8f6ed9d3564035703 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Biebl <biebl@debian.org>
|
||||
Date: Sun, 10 Apr 2011 12:54:53 +0000
|
||||
Subject: Build hald-probe-video4linux on current kernels again
|
||||
|
||||
The hald-probe-video4linux prober supports both v4l1 and v4l2. Support for v4l1
|
||||
has been removed from Linux kernel 2.6.38. Instead of disabling the prober
|
||||
altogether, #ifdef the v4l1 parts when building on a newer kernel.
|
||||
|
||||
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
---
|
||||
(limited to 'hald/linux/probing/probe-video4linux.c')
|
||||
|
||||
diff --git a/hald/linux/probing/probe-video4linux.c b/hald/linux/probing/probe-video4linux.c
|
||||
index 7bc13e8..b055720 100644
|
||||
--- a/hald/linux/probing/probe-video4linux.c
|
||||
+++ b/hald/linux/probing/probe-video4linux.c
|
||||
@@ -30,7 +30,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#ifdef HAVE_LINUX_VIDEODEV_H
|
||||
#include <linux/videodev.h>
|
||||
+#endif
|
||||
#include <linux/videodev2.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -50,7 +52,9 @@ main (int argc, char *argv[])
|
||||
int ret = -1;
|
||||
char *udi;
|
||||
char *device_file;
|
||||
+#ifdef HAVE_LINUX_VIDEODEV_H
|
||||
struct video_capability v1cap;
|
||||
+#endif
|
||||
struct v4l2_capability v2cap;
|
||||
LibHalContext *ctx = NULL;
|
||||
LibHalChangeSet *cset;
|
||||
@@ -107,7 +111,9 @@ main (int argc, char *argv[])
|
||||
LIBHAL_FREE_DBUS_ERROR (&error);
|
||||
libhal_device_add_capability (ctx, udi, "video4linux.radio", &error);
|
||||
}
|
||||
- } else {
|
||||
+ }
|
||||
+#ifdef HAVE_LINUX_VIDEODEV_H
|
||||
+ else {
|
||||
HAL_DEBUG (("ioctl VIDIOC_QUERYCAP failed"));
|
||||
|
||||
if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) {
|
||||
@@ -134,6 +140,7 @@ main (int argc, char *argv[])
|
||||
HAL_DEBUG (("ioctl VIDIOCGCAP failed"));
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
LIBHAL_FREE_DBUS_ERROR (&error);
|
||||
libhal_device_commit_changeset (ctx, cset, &error);
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
|
@ -1,6 +1,6 @@
|
|||
require hal.inc
|
||||
|
||||
PR = "r4"
|
||||
PR = "r5"
|
||||
|
||||
EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h"
|
||||
EXTRA_OEMAKE += "-e 'udevrulesdir=$(sysconfdir)/udev/rules.d'"
|
||||
|
@ -15,3 +15,5 @@ FILES_${PN} =+ "${bindir}/hal-disable-polling \
|
|||
|
||||
SRC_URI[md5sum] = "e9163df591a6f38f59fdbfe33e73bf20"
|
||||
SRC_URI[sha256sum] = "323aacfa52f12def3b0d1e76456e34f027c345adc344aad19a8cc0c59c1a8d02"
|
||||
|
||||
SRC_URI += "file://probe-video4linux.c.patch"
|
||||
|
|
Loading…
Reference in New Issue