summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
Diffstat (limited to 'v4l')
-rw-r--r--v4l/compat.h95
-rw-r--r--v4l/obsolete.txt6
-rwxr-xr-xv4l/scripts/make_config_compat.pl20
-rwxr-xr-xv4l/scripts/make_makefile.pl30
-rw-r--r--v4l/versions.txt3
5 files changed, 142 insertions, 12 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index 0e2ccd7a9..98f57879b 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -18,6 +18,7 @@
#ifdef CONFIG_PROC_FS
#include <linux/module.h>
#include <linux/proc_fs.h>
+#include <linux/device.h>
#endif
#endif
@@ -55,7 +56,9 @@
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
#define PCIAGP_FAIL 0
#define vmalloc_32_user(a) vmalloc_32(a)
+#endif
+#ifdef NEED_BOOL_TYPE
/* bool type and enum-based definition of true and false was added in 2.6.19 */
typedef int bool;
#define true 1
@@ -208,6 +211,10 @@ static inline struct proc_dir_entry *proc_create_data(const char *a,
#define hweight64(x) generic_hweight64(x)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
+typedef unsigned long uintptr_t;
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
#define div64_u64(a,b) div64_64(a,b)
@@ -217,20 +224,17 @@ static inline struct proc_dir_entry *proc_create_data(const char *a,
( h ), \
( x ) ) )
-#define dev_name(dev) ((dev)->bus_id)
-
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
-typedef unsigned long uintptr_t;
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
static inline int list_is_singular(const struct list_head *head)
{
return !list_empty(head) && (head->next == head->prev);
}
+#define dev_name(dev) ((dev)->bus_id)
+
+#define dev_set_name(dev, fmt, arg...) ({ \
+ snprintf((dev)->bus_id, sizeof((dev)->bus_id), fmt , ## arg); \
+ 0; \
+})
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
@@ -248,6 +252,79 @@ static inline int list_is_singular(const struct list_head *head)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond))
+
+#define pci_ioremap_bar(pci, a) \
+ ioremap_nocache(pci_resource_start(pci, a), \
+ pci_resource_len(pci, a))
+#endif
+
+#ifndef PCI_DEVICE_ID_MARVELL_88ALP01_CCIC
+#define PCI_DEVICE_ID_MARVELL_88ALP01_CCIC 0x4102
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
+#ifdef __LINUX_USB_H
+/*
+ * usb_endpoint_* functions
+ *
+ * Included in Linux 2.6.19
+ * Backported to 2.6.18 in Red Hat Enterprise Linux 5.2
+ */
+
+#ifdef RHEL_RELEASE_CODE
+#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(5, 2)
+#define RHEL_HAS_USB_ENDPOINT
+#endif
+#endif
+
+#ifndef RHEL_HAS_USB_ENDPOINT
+static inline int
+usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd)
+{
+ return (epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN;
+}
+
+static inline int
+usb_endpoint_xfer_int(const struct usb_endpoint_descriptor *epd)
+{
+ return (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
+ USB_ENDPOINT_XFER_INT;
+}
+
+static inline int
+usb_endpoint_xfer_isoc(const struct usb_endpoint_descriptor *epd)
+{
+ return (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
+ USB_ENDPOINT_XFER_ISOC;
+}
+
+static inline int
+usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *epd)
+{
+ return (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
+ USB_ENDPOINT_XFER_BULK;
+}
+
+static inline int
+usb_endpoint_is_int_in(const struct usb_endpoint_descriptor *epd)
+{
+ return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd);
+}
+#endif /* RHEL_HAS_USB_ENDPOINT */
+#endif /* __LINUX_USB_H */
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+/*
+ * Linked list API
+ */
+#define list_first_entry(ptr, type, member) \
+ list_entry((ptr)->next, type, member)
+
+/*
+ * uninitialized_var() macro
+ */
+#define uninitialized_var(x) x
#endif
#endif
diff --git a/v4l/obsolete.txt b/v4l/obsolete.txt
index e720a48b8..3d8cd00c9 100644
--- a/v4l/obsolete.txt
+++ b/v4l/obsolete.txt
@@ -1,9 +1,15 @@
+# This file was renamed to v4l2_compat_ioctl32
+video/compat-ioctl32
+
# This file were replaced by videobuf-dma-sg and videobuf-core
video/video-buf
# This file were replaced by videobuf-dvb
video/video-buf-dvb
+#This driver has been reworked and moved to dvb-usb
+dvb/cinergyT2/cinergyT2
+
# Those drivers were moved to common/tuners
dvb/frontends/mt2060
dvb/frontends/mt2131
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index e538c925b..bd34e7193 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -83,12 +83,32 @@ sub check_snd_ctl_boolean_mono_info()
close INNET;
}
+sub check_bool()
+{
+ my $file = "$kdir/include/linux/types.h";
+ my $old_syntax = 1;
+
+ open INDEP, "<$file" or die "File not found: $file";
+ while (<INDEP>) {
+ if (m/^\s*typedef.*bool;/) {
+ $old_syntax = 0;
+ last;
+ }
+ }
+
+ if ($old_syntax) {
+ $out.= "\n#define NEED_BOOL_TYPE 1\n";
+ }
+ close INDEP;
+}
+
sub check_other_dependencies()
{
check_spin_lock();
check_sound_driver_h();
check_snd_ctl_boolean_mono_info();
check_snd_pcm_rate_to_rate_bit();
+ check_bool();
}
# Do the basic rules
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl
index 82821b43b..ce6f00516 100755
--- a/v4l/scripts/make_makefile.pl
+++ b/v4l/scripts/make_makefile.pl
@@ -157,6 +157,33 @@ sub removeobsolete()
}
}
+#
+# Special hack for Ubuntu with their non-standard dir
+#
+sub removeubuntu()
+{
+ my $dest = "/lib/modules/\$(KERNELRELEASE)/ubuntu/media";
+ my $filelist;
+
+ while ( my ($dir, $files) = each(%instdir) ) {
+ $filelist .= join(' ', keys %$files);
+ }
+ while ( my ($dir, $files) = each(%obsolete) ) {
+ $filelist .= join(' ', keys %$files);
+ }
+ $filelist =~ s/\s+$//;
+
+ print OUT "\t\@if [ -d $dest ]; then ";
+ print OUT "printf \"\\nHmm... distro kernel with a non-standard place for module backports detected.\\n";
+ print OUT "Please always prefer to use vanilla upstream kernel with V4L/DVB\\n";
+ print OUT "I'll try to remove old/obsolete LUM files from $dest:\\n\"; ";
+ print OUT "files='", $filelist, "'; ";
+
+ print OUT "for i in \$\$files;do find \"$dest\" \-name \"\$\$i\" \-exec echo \'{}\' \';\' ;";
+ print OUT " find \"$dest\" \-name \"\$\$i\" \-exec rm \'{}\' \';\' ;";
+ print OUT " done;";
+ print OUT " fi\n";
+}
getobsolete();
@@ -169,6 +196,7 @@ print OUT "\t\@echo \"Stripping debug info from files\"\n";
print OUT "\t\@strip --strip-debug \$(inst-m)\n\n";
removeobsolete();
+removeubuntu();
print OUT "\t\@echo \"Installing kernel modules under \$(DESTDIR)\$(KDIR26)/:\"\n";
@@ -191,8 +219,8 @@ print OUT "\t/sbin/depmod -a \$(KERNELRELEASE) \$(if \$(DESTDIR),-b \$(DESTDIR))
print OUT "media-rminstall::\n";
removeobsolete();
+removeubuntu();
-print OUT "\t\@echo -e \"\\nRemoving old \$(DEST) files\\n\"\n";
while ( my ($dir, $files) = each(%instdir) ) {
print OUT "\t\@echo -e \"\\nRemoving old \$(KDIR26)/$dir files:\"\n";
print OUT "\t\@files='", join(' ', keys %$files), "'; ";
diff --git a/v4l/versions.txt b/v4l/versions.txt
index 2b3ec7638..3ef9af5d8 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -16,8 +16,6 @@ SOC_CAMERA_MT9M001
VIDEO_TCM825X
# This driver requires list_first_entry
USB_STKWEBCAM
-#Initial version for this driver
-USB_VIDEO_CLASS
# This driver needs div64_64
DVB_DRX397XD
# Assumes struct input_dev has a dev field
@@ -45,6 +43,7 @@ USB_S2255
VIDEO_USBVISION
# Uses supports_autosuspend
USB_MR800
+USB_DSBR
# Uses remap_vmalloc_range()
[2.6.18]