summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xv4l/scripts/make_config_compat.pl25
1 files changed, 13 insertions, 12 deletions
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index 2fc37d06d..e94bf2803 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -218,21 +218,22 @@ sub check_net_dev()
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 (<INNET>) {
- if (m/usb_endpoint_type/) {
- $need_compat = 0;
- last;
+ my @files = ( "$kdir/include/linux/usb.h", "$kdir/include/linux/usb/ch9.h" );
+
+ foreach my $file ( @files ) {
+ open IN, "<$file" or die "File not found: $file";
+ while (<IN>) {
+ if (m/usb_endpoint_type/) {
+ close IN;
+ # definition found. No need for compat
+ return;
+ }
}
+ close IN;
}
- if ($need_compat) {
- $out.= "\n#define NEED_USB_ENDPOINT_TYPE 1\n";
- }
- close INNET;
+ # definition not found. This means that we need compat
+ $out.= "\n#define NEED_USB_ENDPOINT_TYPE 1\n";
}
sub check_pci_ioremap_bar()