From b0ab681e920adac28d099cb1ec192d2ada2c160f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 30 Dec 2008 08:47:03 -0200 Subject: Add compat support for usb_endpoint_type() From: Mauro Carvalho Chehab While here, make sure that config-compat.h is rebuild if the script change. Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_config_compat.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'v4l/scripts') diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index 8fb7a9441..dc6653b0d 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -216,6 +216,25 @@ sub check_net_dev() close INNET; } +sub check_usb_endpoint_type() +{ + my $file = "$kdir/include/linux/usb.h"; + my $need_compat = 1; + + open INNET, "<$file" or die "File not found: $file"; + while () { + if (m/usb_endpoint_type/) { + $need_compat = 0; + last; + } + } + + if ($need_compat) { + $out.= "\n#define NEED_USB_ENDPOINT_TYPE 1\n"; + } + close INNET; +} + sub check_other_dependencies() { check_spin_lock(); @@ -229,6 +248,7 @@ sub check_other_dependencies() check_pcm_lock(); check_algo_control(); check_net_dev(); + check_usb_endpoint_type(); } # Do the basic rules -- cgit v1.2.3