summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/cx88/cx88-alsa.c2
-rwxr-xr-xv4l/scripts/gentree.pl3
-rw-r--r--v4l/scripts/make_config_compat.pl20
3 files changed, 24 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c
index f441193eb..d858bdd5c 100644
--- a/linux/drivers/media/video/cx88/cx88-alsa.c
+++ b/linux/drivers/media/video/cx88/cx88-alsa.c
@@ -103,7 +103,7 @@ typedef struct cx88_audio_dev snd_cx88_card_t;
#define chip_t snd_cx88_card_t
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+#ifdef COMPAT_SND_CTL_BOOLEAN_MONO
static int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl
index cfff178b1..a10738648 100755
--- a/v4l/scripts/gentree.pl
+++ b/v4l/scripts/gentree.pl
@@ -62,9 +62,12 @@ my %defs = (
'I2C_PEC' => 1,
'I2C_DF_DUMMY' => 0,
'CONFIG_XC3028' => 0,
+ 'HAVE_XC2028'=> 0,
+ 'HAVE_XC3028' => 0,
'I2C_CLASS_TV_ANALOG' => 1,
'I2C_CLASS_TV_DIGITAL' => 1,
'OLD_XMIT_LOCK' => 0,
+ 'COMPAT_SND_CTL_BOOLEAN_MONO' => 0,
'CONFIG_VIVI_SCATTER' => 0,
'CONFIG_BIGPHYS_AREA' => 0,
'BUZ_USE_HIMEM' => 1,
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index be577d247..21dce0126 100644
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -26,9 +26,29 @@ sub check_spin_lock()
close INNET;
}
+sub check_snd_ctl_boolean_mono_info()
+{
+ my $file = "$kdir/include/sound/control.h";
+ my $old_syntax = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/snd_ctl_boolean_mono_info/) {
+ $old_syntax = 0;
+ last;
+ }
+ }
+
+ if ($old_syntax) {
+ $out.= "\n#define COMPAT_SND_CTL_BOOLEAN_MONO 1\n";
+ }
+ close INNET;
+}
+
sub check_other_dependencies()
{
check_spin_lock();
+ check_snd_ctl_boolean_mono_info();
}
# Do the basic rules