summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-01-15 12:25:10 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-15 12:25:10 -0200
commit6c960a5f6ca8df030653648f416116e635fb4589 (patch)
tree42452b816b518aa87f6f4a7f236f88916b4df2fe
parent7efa1876cdc179b39023f28706cba80d6db20652 (diff)
downloadmediapointer-dvb-s2-6c960a5f6ca8df030653648f416116e635fb4589.tar.gz
mediapointer-dvb-s2-6c960a5f6ca8df030653648f416116e635fb4589.tar.bz2
Adds the proper compatibility code for radio-si470x and stk-webcam
From: Mauro Carvalho Chehab <mchehab@infradead.org> Make radio-si470x and stk-webcam backward compatible with older kernels. This patch adds compat.h header for those files, reorder include order and adds USB_DEVICE_AND_INTERFACE_INFO macro. Thiw way, stk-webcam is backward compatible with 2.6.22, and radio-si470x with kernel 2.6.20. The backports weren't tested, but compile fine. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--linux/drivers/media/radio/radio-si470x.c5
-rw-r--r--linux/drivers/media/video/stk-webcam.c3
-rw-r--r--v4l/compat.h10
-rw-r--r--v4l/versions.txt10
4 files changed, 21 insertions, 7 deletions
diff --git a/linux/drivers/media/radio/radio-si470x.c b/linux/drivers/media/radio/radio-si470x.c
index eccbc750e..f34900cd4 100644
--- a/linux/drivers/media/radio/radio-si470x.c
+++ b/linux/drivers/media/radio/radio-si470x.c
@@ -72,11 +72,12 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/input.h>
-#include <linux/videodev2.h>
-#include <media/v4l2-common.h>
#include <linux/usb.h>
#include <linux/hid.h>
#include <linux/version.h>
+#include "compat.h"
+#include <linux/videodev2.h>
+#include <media/v4l2-common.h>
#include <media/rds.h>
diff --git a/linux/drivers/media/video/stk-webcam.c b/linux/drivers/media/video/stk-webcam.c
index f300eca3c..8621df261 100644
--- a/linux/drivers/media/video/stk-webcam.c
+++ b/linux/drivers/media/video/stk-webcam.c
@@ -30,9 +30,10 @@
#include <linux/kref.h>
#include <linux/usb.h>
+#include <linux/vmalloc.h>
+#include "compat.h"
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
-#include <linux/vmalloc.h>
#include "stk-webcam.h"
diff --git a/v4l/compat.h b/v4l/compat.h
index 92cbd47ec..cd3a7ac86 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -494,6 +494,16 @@ do { \
# define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
#endif
+
+#ifndef USB_DEVICE_AND_INTERFACE_INFO
+# define USB_DEVICE_AND_INTERFACE_INFO(vend,prod,cl,sc,pr) \
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \
+ | USB_DEVICE_ID_MATCH_DEVICE, \
+ .idVendor = (vend), .idProduct = (prod), \
+ .bInterfaceClass = (cl), \
+ .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr)
+#endif
+
#endif
/*
* Local variables:
diff --git a/v4l/versions.txt b/v4l/versions.txt
index b03b4b4aa..958be1de9 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -3,13 +3,15 @@
# This driver is marked at kernel as broken
VIDEO_PLANB
-[2.6.23]
-#This driver requires USB_DEVICE_AND_INTERFACE_INFO
-CONFIG_USB_STKWEBCAM
-
[2.6.22]
#This driver requires I2C probe/remove fields
VIDEO_TCM825X
+# This driver requires list_first_entry
+CONFIG_USB_STKWEBCAM
+
+[2.6.20]
+#This driver requires HID_REQ_GET_REPORT
+USB_SI470X
[2.6.19]
#This driver were developed at kernel 2.6.19, requiring vmalloc_user/remap_vmalloc_range