diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-23 03:06:49 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-23 03:06:49 -0300 |
commit | 8b3ed0d52132397a5de88531f5287b5e7864b76e (patch) | |
tree | 8a2ce91805633daa4063b1910f50c7bad1c327a5 /v4l/scripts/make_config_compat.pl | |
parent | 9bd4b1d143281470bf7a00afda20a7368154e213 (diff) | |
parent | 3f5baede21113b8adf1b40d403e19a1ced1b07b8 (diff) | |
download | mediapointer-dvb-s2-8b3ed0d52132397a5de88531f5287b5e7864b76e.tar.gz mediapointer-dvb-s2-8b3ed0d52132397a5de88531f5287b5e7864b76e.tar.bz2 |
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-subdev2
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l/scripts/make_config_compat.pl')
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 46 |
1 files changed, 43 insertions, 3 deletions
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 |