diff options
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index 3a8bdd81e..d24b5f718 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -197,6 +197,63 @@ sub check_algo_control() close INNET; } +sub check_net_dev() +{ + my $file = "$kdir/include/linux/netdevice.h"; + my $need_compat = 1; + + open INNET, "<$file" or die "File not found: $file"; + while (<INNET>) { + if (m/netdev_priv/) { + $need_compat = 0; + last; + } + } + + if ($need_compat) { + $out.= "\n#define NEED_NETDEV_PRIV 1\n"; + } + 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 (<INNET>) { + 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_pci_ioremap_bar() +{ + my $file = "$kdir/include/linux/pci.h"; + my $need_compat = 1; + + open INNET, "<$file" or die "File not found: $file"; + while (<INNET>) { + if (m/pci_ioremap_bar/) { + $need_compat = 0; + last; + } + } + + if ($need_compat) { + $out.= "\n#define NEED_PCI_IOREMAP_BAR 1\n"; + } + close INNET; +} + sub check_other_dependencies() { check_spin_lock(); @@ -209,6 +266,9 @@ sub check_other_dependencies() check_proc_create(); check_pcm_lock(); check_algo_control(); + check_net_dev(); + check_usb_endpoint_type(); + check_pci_ioremap_bar(); } # Do the basic rules |