From 8cc78392269a77c3aed220bb457e991924480779 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 11:27:26 -0300 Subject: compat.h: improve detection for need poll_schedule() From: Mauro Carvalho Chehab Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_config_compat.pl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'v4l/scripts') diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index e94bf2803..32b111f4e 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -274,6 +274,28 @@ sub check_snd_card_create() close IN; } +sub check_poll_schedule() +{ + + + my @files = ( "$kdir//include/linux/poll.h" ); + + foreach my $file ( @files ) { + open IN, "<$file" or die "File not found: $file"; + while () { + if (m/poll_schedule/) { + close IN; + # definition found. No need for compat + return; + } + } + close IN; + } + + # definition not found. This means that we need compat + $out.= "\n#define NEED_POLL_SCHEDULE 1\n"; +} + sub check_other_dependencies() { check_spin_lock(); @@ -290,6 +312,7 @@ sub check_other_dependencies() check_usb_endpoint_type(); check_pci_ioremap_bar(); check_snd_card_create(); + check_poll_schedule(); } # Do the basic rules -- cgit v1.2.3