diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-14 11:11:08 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-14 11:11:08 -0300 |
commit | d54ae5db8294db9af22f394d69591b8cf500ddc8 (patch) | |
tree | 19455a5f317fc56a1a541aa24b008befe03792ae /v4l | |
parent | 82753c8a0c338f489a20e0554eac589a390ac6bb (diff) | |
download | mediapointer-dvb-s2-d54ae5db8294db9af22f394d69591b8cf500ddc8.tar.gz mediapointer-dvb-s2-d54ae5db8294db9af22f394d69591b8cf500ddc8.tar.bz2 |
Fix compatibility for usb_endpoint_type and 2.6.30
From: Mauro Carvalho Chehab <mchehab@redhat.com>
compat.h: usb_endpoint_type can be found on ch9.h header
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l')
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 25 |
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() |