diff options
Diffstat (limited to 'v4l/scripts')
-rw-r--r--[-rwxr-xr-x] | v4l/scripts/gentree.pl | 16 | ||||
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 46 |
2 files changed, 45 insertions, 17 deletions
diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl index 1968bb334..b9053f464 100755..100644 --- a/v4l/scripts/gentree.pl +++ b/v4l/scripts/gentree.pl @@ -22,8 +22,8 @@ # If gentree knows the result of an expression, that directive will be # "processed", otherwise it will be an "other". gentree knows the value # of LINUX_VERSION_CODE, BTTV_VERSION_CODE, the KERNEL_VERSION(x,y,z) -# macro, numeric constants like 0 and 1, and a few defines like MM_KERNEL -# and STV0297_CS2. +# macro, numeric constants like 0 and 1, and a few defines like +# I2C_CLASS_TV_DIGITAL # # An exception is if the comment "/*KEEP*/" appears after the expression, # in which case that directive will be considered an "other" and not @@ -55,22 +55,10 @@ my %defs = ( 'LINUX_VERSION_CODE' => $LINUXCODE, 'BTTV_VERSION_CODE' => $BTTVCODE, '_COMPAT_H' => 0, - 'MM_KERNEL' => ($extra =~ /-mm/)?1:0, - 'BROKEN_XAWTV' => 0, - 'STV0297_CS2' => 0, - 'HAVE_VIDEO_BUF_DVB' => 1, - '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, 'NEED_SOUND_DRIVER_H' => 0, 'TTUSB_KERNEL' => 1, 'NO_PCM_LOCK' => 0, 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 |