diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-20 21:25:44 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-20 21:25:44 -0300 |
commit | 4b2b8049722233fd80417b5702b1debd5d0e0ad0 (patch) | |
tree | aec6aa8e0c5168ed1d556f21f28783ece22a905a /v4l | |
parent | b6b5cafa2594a09626f8a3a4d23bbb0f1b712941 (diff) | |
download | mediapointer-dvb-s2-4b2b8049722233fd80417b5702b1debd5d0e0ad0.tar.gz mediapointer-dvb-s2-4b2b8049722233fd80417b5702b1debd5d0e0ad0.tar.bz2 |
Kbuild: make USB_STV06XX compile with RHEL5 kernels
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/compat.h | 6 | ||||
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 46 | ||||
-rw-r--r-- | v4l/versions.txt | 3 |
3 files changed, 48 insertions, 7 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index ce28da615..f9e450798 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -283,10 +283,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 diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index 3c2b623ca..7c7841459 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,46 @@ 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_other_dependencies() { check_spin_lock(); @@ -317,6 +355,8 @@ sub check_other_dependencies() check_pci_ioremap_bar(); check_snd_card_create(); check_poll_schedule(); + check_snd_BUG_ON(); + check_bitops(); } # Do the basic rules diff --git a/v4l/versions.txt b/v4l/versions.txt index 3c57c14bd..7e8e2fa6e 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -5,9 +5,6 @@ # 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 |