diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-03-28 14:46:28 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-03-28 14:46:28 -0300 |
commit | 79210327fbe5a02bcb93d9b464ccb38fce31b432 (patch) | |
tree | 17379c86cf7ef474c35658be586bb0d94d65ba1e | |
parent | b809e0a0b09c4c4954d50ad8720df4b7ed56c7b9 (diff) | |
download | mediapointer-dvb-s2-79210327fbe5a02bcb93d9b464ccb38fce31b432.tar.gz mediapointer-dvb-s2-79210327fbe5a02bcb93d9b464ccb38fce31b432.tar.bz2 |
Avoid build warnings for distro-patched 2.6.24 kernels
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | linux/sound/pci/bt87x.c | 2 | ||||
-rw-r--r-- | v4l/compat.h | 2 | ||||
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 20 |
3 files changed, 22 insertions, 2 deletions
diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c index aeef46b61..7e6f22041 100644 --- a/linux/sound/pci/bt87x.c +++ b/linux/sound/pci/bt87x.c @@ -28,7 +28,7 @@ #include <linux/moduleparam.h> #include <linux/bitops.h> #include <asm/io.h> -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) +#ifdef NEED_SOUND_DRIVER_H #include <sound/driver.h> #endif #include <sound/core.h> diff --git a/v4l/compat.h b/v4l/compat.h index 0352fcd39..257143a6b 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -15,7 +15,7 @@ #endif /* To allow alsa code to work */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) +#ifdef NEED_SOUND_DRIVER_H #include <sound/driver.h> #endif diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index 785f9ff72..e538c925b 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -26,6 +26,25 @@ sub check_spin_lock() close INNET; } +sub check_sound_driver_h() +{ + my $file = "$kdir/include/sound/driver.h"; + my $old_syntax = 1; + + open INNET, "<$file" or return; + while (<INNET>) { + if (m/This file is deprecated/) { + $old_syntax = 0; + last; + } + } + + if ($old_syntax) { + $out.= "\n#define NEED_SOUND_DRIVER_H 1\n"; + } + close INNET; +} + sub check_snd_pcm_rate_to_rate_bit() { my $file = "$kdir/include/sound/pcm.h"; @@ -67,6 +86,7 @@ sub check_snd_ctl_boolean_mono_info() sub check_other_dependencies() { check_spin_lock(); + check_sound_driver_h(); check_snd_ctl_boolean_mono_info(); check_snd_pcm_rate_to_rate_bit(); } |