From 6efca26e38f50e85f210e25323eceacce61d6ebe Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 27 May 2009 05:42:44 +0000 Subject: Compile ADV7343 and THS7303 drivers for kernels >= 2.6.26 From: chaithrika@ti.com Signed-off-by: Chaithrika U S Signed-off-by: Mauro Carvalho Chehab --- v4l/versions.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'v4l') diff --git a/v4l/versions.txt b/v4l/versions.txt index 1e3527dc0..3c57c14bd 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -4,9 +4,6 @@ [2.6.29] # Needs defines that are only available from 2.6.29 VIDEO_PXA27x -# Needs the newer I2C binding model -VIDEO_ADV7343 -VIDEO_THS7303 [2.6.28] USB_STV06XX @@ -16,6 +13,8 @@ USB_STV06XX VIDEO_TVP514X # requires id_table and new i2c stuff RADIO_TEA5764 +VIDEO_THS7303 +VIDEO_ADV7343 [2.6.25] # Requires gpiolib -- cgit v1.2.3 From 4b2b8049722233fd80417b5702b1debd5d0e0ad0 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 20 Jun 2009 21:25:44 -0300 Subject: Kbuild: make USB_STV06XX compile with RHEL5 kernels From: Mauro Carvalho Chehab Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/compat.h | 6 ++++- v4l/scripts/make_config_compat.pl | 46 ++++++++++++++++++++++++++++++++++++--- v4l/versions.txt | 3 --- 3 files changed, 48 insertions(+), 7 deletions(-) (limited to 'v4l') 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 () { + 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 () { + 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 -- cgit v1.2.3 From fd98131ec0038d3c799a78d6247b1f76777d5160 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sat, 20 Jun 2009 09:42:15 -0700 Subject: compat: Fix __fls for certain ARM kernels From: Trent Piepho __fls() has a broken definition for ARM in from v2.6.26-7260-g0c65f45 to v2.6.28-rc6-187-g94fc733. We can fix this by just undef'ing __fls before the compat define. This will let us replace the broken one with our working one. For those kernels where the compat code is triggered and __fls works, we replace the working one with our (identical) working version, which is not a problem. Priority: normal Signed-off-by: Trent Piepho --- v4l/compat.h | 1 + 1 file changed, 1 insertion(+) (limited to 'v4l') diff --git a/v4l/compat.h b/v4l/compat.h index ce28da615..4e554add0 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -462,6 +462,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) { -- cgit v1.2.3