packages/multimedia/qc-usb/patches/003-linux_2_6_27.patch
hauke b63a5bf7ae [qc-usb] make it work with kernel 2.6.27 and 2.6.28.
git-svn-id: svn://svn.openwrt.org/openwrt/packages@16454 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-06-14 20:18:50 +00:00

26 lines
833 B
Diff

---
--- a/qc-driver.c
+++ b/qc-driver.c
@@ -2528,7 +2528,11 @@ static int qc_v4l_ioctl(struct video_dev
if (qcdebug&QC_DEBUGUSER) PDEBUG("VIDIOCGCAP");
memset(&b, 0, sizeof(b));
strcpy(b.name, "Logitech QuickCam USB"); /* Max 31 characters */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+ b.type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
+#else
b.type = qc->vdev.type;
+#endif
b.channels = 1;
b.audios = 0;
b.maxwidth = qc->sensor_data.maxwidth;
@@ -3007,7 +3011,9 @@ static struct file_operations qc_v4l_fop
static struct video_device qc_v4l_template = {
name: "QuickCam USB",
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
type: VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE,
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
hardware: VID_HARDWARE_QCAM_USB,
#endif