summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
Diffstat (limited to 'v4l')
-rw-r--r--v4l/Makefile2
-rw-r--r--v4l/compat.h71
-rwxr-xr-xv4l/scripts/make_config_compat.pl40
-rwxr-xr-xv4l/scripts/release.sh2
-rw-r--r--v4l/versions.txt7
5 files changed, 116 insertions, 6 deletions
diff --git a/v4l/Makefile b/v4l/Makefile
index 2aa856974..f96873227 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -256,7 +256,7 @@ links::
oss:
ln -sf . oss
-config-compat.h:: $(obj)/.version .myconfig
+config-compat.h:: $(obj)/.version .myconfig scripts/make_config_compat.pl
perl scripts/make_config_compat.pl $(SRCDIR) $(obj)/.myconfig $(obj)/config-compat.h
kernel-links makelinks::
diff --git a/v4l/compat.h b/v4l/compat.h
index ad2d9df22..3b04c91f6 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -34,6 +34,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
#define set_freezable()
#define cancel_delayed_work_sync cancel_rearming_delayed_work
+#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
#endif
#ifndef __pure
@@ -279,8 +280,8 @@ static inline int dummy_algo_control(struct i2c_adapter *adapter,
#define PCI_DEVICE_ID_MARVELL_88ALP01_CCIC 0x4102
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
#ifdef __LINUX_USB_H
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
/*
* usb_endpoint_* functions
*
@@ -327,10 +328,71 @@ usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd)
{
return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd);
}
+
+static inline int usb_endpoint_dir_out(
+ const struct usb_endpoint_descriptor *epd)
+{
+ return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT);
+}
+
+static inline int usb_endpoint_is_bulk_in(
+ const struct usb_endpoint_descriptor *epd)
+{
+ return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd));
+}
+
+static inline int usb_endpoint_is_bulk_out(
+ const struct usb_endpoint_descriptor *epd)
+{
+ return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd));
+}
+
+static inline int usb_endpoint_is_int_out(
+ const struct usb_endpoint_descriptor *epd)
+{
+ return (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd));
+}
+
+static inline int usb_endpoint_is_isoc_in(
+ const struct usb_endpoint_descriptor *epd)
+{
+ return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd));
+}
+
+static inline int usb_endpoint_is_isoc_out(
+ const struct usb_endpoint_descriptor *epd)
+{
+ return (usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd));
+}
#endif /* RHEL_HAS_USB_ENDPOINT */
-#endif /* __LINUX_USB_H */
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 21)
+#ifndef RHEL_HAS_USB_ENDPOINT
+static inline int usb_endpoint_xfer_control(
+ const struct usb_endpoint_descriptor *epd)
+{
+ return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
+ USB_ENDPOINT_XFER_CONTROL);
+}
+#endif /* RHEL_HAS_USB_ENDPOINT */
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
+static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd)
+{
+ return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+}
+#endif
+
+#ifdef NEED_USB_ENDPOINT_TYPE
+static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd)
+{
+ return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
+}
+#endif
+#endif /* __LINUX_USB_H */
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
/*
* Linked list API
@@ -344,4 +406,9 @@ usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd)
#define uninitialized_var(x) x = x
#endif
+#ifdef NEED_NETDEV_PRIV
+#define netdev_priv(dev) ((dev)->priv)
+#endif
+
+
#endif
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index 3a8bdd81e..dc6653b0d 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -197,6 +197,44 @@ sub check_algo_control()
close INNET;
}
+sub check_net_dev()
+{
+ my $file = "$kdir/include/linux/netdevice.h";
+ my $need_compat = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/netdev_priv/) {
+ $need_compat = 0;
+ last;
+ }
+ }
+
+ if ($need_compat) {
+ $out.= "\n#define NEED_NETDEV_PRIV 1\n";
+ }
+ close INNET;
+}
+
+sub check_usb_endpoint_type()
+{
+ my $file = "$kdir/include/linux/usb.h";
+ my $need_compat = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/usb_endpoint_type/) {
+ $need_compat = 0;
+ last;
+ }
+ }
+
+ if ($need_compat) {
+ $out.= "\n#define NEED_USB_ENDPOINT_TYPE 1\n";
+ }
+ close INNET;
+}
+
sub check_other_dependencies()
{
check_spin_lock();
@@ -209,6 +247,8 @@ sub check_other_dependencies()
check_proc_create();
check_pcm_lock();
check_algo_control();
+ check_net_dev();
+ check_usb_endpoint_type();
}
# Do the basic rules
diff --git a/v4l/scripts/release.sh b/v4l/scripts/release.sh
index 4e9c810bc..5055675d6 100755
--- a/v4l/scripts/release.sh
+++ b/v4l/scripts/release.sh
@@ -16,7 +16,7 @@ files_common="$files_v4l $files_tuner $files_i2c doc"
files_ir="ir-common.[ch]"
files_audio="msp3400.[ch] tvaudio.[ch] tvmixer.[ch]"
-files_bttv="bt848.h btcx*.[ch] bttv*.[ch] bt832.[ch] ir-kbd*.c"
+files_bttv="bt848.h btcx*.[ch] bttv*.[ch] ir-kbd*.c"
files_saa="saa7134*.[ch] saa6752hs.[ch] ir-kbd-i2c.c"
files_cx="btcx*.[ch] cx*.[ch]"
diff --git a/v4l/versions.txt b/v4l/versions.txt
index c09b5d69a..6d547a509 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -1,9 +1,14 @@
# Use this for stuff for drivers that don't compile
[2.6.99]
+[2.6.28]
+USB_STV06XX
+
[2.6.26]
# Needs camera.h
VIDEO_PXA27x
+# Requires struct i2c_device_id
+VIDEO_TVP514X
[2.6.25]
# Requires gpiolib
@@ -20,8 +25,6 @@ USB_STKWEBCAM
DVB_DRX397XD
# Assumes struct input_dev has a dev field
DVB_DM1105
-# Need cancel_work_sync
-VIDEO_CX18
[2.6.20]
#This driver requires HID_REQ_GET_REPORT