summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
Diffstat (limited to 'v4l')
-rw-r--r--v4l/compat.h15
-rwxr-xr-xv4l/scripts/do_merge.pl6
-rwxr-xr-xv4l/scripts/make_config_compat.pl67
-rw-r--r--v4l/versions.txt12
4 files changed, 89 insertions, 11 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index ce28da615..11dc57109 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -9,7 +9,7 @@
* non-delayed work and struct delayed_work was created for delayed work. This
* will rename the structures. Hopefully no one will decide to name something
* delayed_work in the same context as something named work_struct. */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
+#ifdef NEED_DELAYED_WORK
#define delayed_work work_struct
#define INIT_DELAYED_WORK(a,b,c) INIT_WORK(a,b,c)
#endif
@@ -146,6 +146,12 @@ do { \
((dev->bus && 0 == strcmp(dev->bus->name, "i2c")) ? to_i2c_client(dev) : NULL)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
+/* Construct an I2C_CLIENT_END-terminated array of i2c addresses */
+#define I2C_ADDRS(addr, addrs...) \
+ ((const unsigned short []){ addr, ## addrs, I2C_CLIENT_END })
+#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 \
@@ -283,10 +289,14 @@ static inline int dummy_algo_control(struct i2c_adapter *adapter,
})
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
+#ifdef NEED_SND_BUG_ON
#define snd_BUG_ON(cond) WARN((cond), "BUG? (%s)\n", __stringify(cond))
#endif
+#ifdef NEED_BITOPS
+#define BIT(x) (1UL<<((x)%BITS_PER_LONG))
+#endif
+
#ifndef PCI_DEVICE_ID_MARVELL_88ALP01_CCIC
#define PCI_DEVICE_ID_MARVELL_88ALP01_CCIC 0x4102
#endif
@@ -462,6 +472,7 @@ static inline int snd_card_create(int idx, const char *id,
defined(__x86_64__) || \
(BITS_PER_LONG == 64 && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)))
/* This define will prevent breakage if __fls was already defined. */
+#undef __fls
#define __fls v4l_compat_fls
static inline unsigned long v4l_compat_fls(unsigned long x)
{
diff --git a/v4l/scripts/do_merge.pl b/v4l/scripts/do_merge.pl
index 1a6bbb1ee..6eccd77e7 100755
--- a/v4l/scripts/do_merge.pl
+++ b/v4l/scripts/do_merge.pl
@@ -64,7 +64,7 @@ sub check_status()
sub rollback()
{
- print "Rolling back hg pull $merge_tree\n";
+ print "*** ERROR *** Rolling back hg pull $merge_tree\n";
system("hg rollback");
system("hg update -C");
exit -1;
@@ -96,7 +96,7 @@ if ($user eq "") {
# Last try to come up with something
if ($user eq "") {
- print "User not known. Can't procceed\n";
+ print "*** ERROR *** User not known. Can't procceed\n";
exit -1;
}
@@ -158,7 +158,7 @@ if (!ret) {
$ret = system ('make mismatch|egrep -v "^\s*CC"|egrep -v "^\s*LD"');
}
if ($ret) {
- print "Build failed. Can't procceed.\n";
+ print "*** ERROR *** Build failed. Can't procceed.\n";
# To avoid the risk of doing something really bad, let's ask the user to run hg strip
print "Your tree is dirty. Since hg has only one rollback level, you'll need to use, instead:";
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index 3c2b623ca..1f5b8bae6 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -280,9 +280,7 @@ sub check_snd_card_create()
sub check_poll_schedule()
{
-
-
- my @files = ( "$kdir//include/linux/poll.h" );
+ my @files = ( "$kdir/include/linux/poll.h" );
foreach my $file ( @files ) {
open IN, "<$file" or die "File not found: $file";
@@ -300,6 +298,66 @@ sub check_poll_schedule()
$out.= "\n#define NEED_POLL_SCHEDULE 1\n";
}
+sub check_snd_BUG_ON()
+{
+ my @files = ( "$kdir/include/sound/core.h" );
+
+ foreach my $file ( @files ) {
+ open IN, "<$file" or die "File not found: $file";
+ while (<IN>) {
+ if (m/snd_BUG_ON/) {
+ close IN;
+ # definition found. No need for compat
+ return;
+ }
+ }
+ close IN;
+ }
+
+ # definition not found. This means that we need compat
+ $out.= "\n#define NEED_SND_BUG_ON 1\n";
+}
+
+sub check_bitops()
+{
+ my @files = ( "$kdir/include/linux/bitops.h" );
+
+ foreach my $file ( @files ) {
+ open IN, "<$file" or next;
+ while (<IN>) {
+ if (m/#define\s+BIT\(/) {
+ close IN;
+ # definition found. No need for compat
+ return;
+ }
+ }
+ close IN;
+ }
+
+ # definition not found. This means that we need compat
+ $out.= "\n#define NEED_BITOPS 1\n";
+}
+
+sub check_delayed_work()
+{
+ my @files = ( "$kdir//include/linux/workqueue.h" );
+
+ foreach my $file ( @files ) {
+ open IN, "<$file" or die "File not found: $file";
+ while (<IN>) {
+ if (m/struct\s+delayed_work/) {
+ close IN;
+ # definition found. No need for compat
+ return;
+ }
+ }
+ close IN;
+ }
+
+ # definition not found. This means that we need compat
+ $out.= "\n#define NEED_DELAYED_WORK 1\n";
+}
+
sub check_other_dependencies()
{
check_spin_lock();
@@ -317,6 +375,9 @@ sub check_other_dependencies()
check_pci_ioremap_bar();
check_snd_card_create();
check_poll_schedule();
+ check_snd_BUG_ON();
+ check_bitops();
+ check_delayed_work();
}
# Do the basic rules
diff --git a/v4l/versions.txt b/v4l/versions.txt
index 3c57c14bd..792419f99 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -1,13 +1,17 @@
# Use this for stuff for drivers that don't compile
[2.6.99]
+[2.6.31]
+# These rely on arch support that wasn't available until 2.6.31
+VIDEO_VPSS_SYSTEM
+VIDEO_VPFE_CAPTURE
+VIDEO_DM6446_CCDC
+VIDEO_DM355_CCDC
+
[2.6.29]
# Needs defines that are only available from 2.6.29
VIDEO_PXA27x
-[2.6.28]
-USB_STV06XX
-
[2.6.26]
# Requires struct i2c_device_id
VIDEO_TVP514X
@@ -25,6 +29,8 @@ SOC_CAMERA_MT9M001
[2.6.23]
# Needs field intf_assoc in struct usb_host_config
VIDEO_CX231XX
+# Some freezer routines
+USB_GSPCA_SN9C20X_EVDEV
[2.6.22]
#This driver requires I2C probe/remove fields