From 6c960a5f6ca8df030653648f416116e635fb4589 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 15 Jan 2008 12:25:10 -0200 Subject: Adds the proper compatibility code for radio-si470x and stk-webcam From: Mauro Carvalho Chehab 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 --- linux/drivers/media/radio/radio-si470x.c | 5 +++-- linux/drivers/media/video/stk-webcam.c | 3 ++- v4l/compat.h | 10 ++++++++++ v4l/versions.txt | 10 ++++++---- 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 #include #include -#include -#include #include #include #include +#include "compat.h" +#include +#include #include 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 #include +#include +#include "compat.h" #include #include -#include #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 -- cgit v1.2.3