summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-xv4l/scripts/gentree.pl1
-rwxr-xr-xv4l/scripts/make_config_compat.pl20
2 files changed, 21 insertions, 0 deletions
diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl
index d84608aa1..1968bb334 100755
--- a/v4l/scripts/gentree.pl
+++ b/v4l/scripts/gentree.pl
@@ -74,6 +74,7 @@ my %defs = (
'NEED_SOUND_DRIVER_H' => 0,
'TTUSB_KERNEL' => 1,
'NO_PCM_LOCK' => 0,
+ 'NEED_ALGO_CONTROL' => 0,
);
#################################################################
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index 3aac7e3b3..3a8bdd81e 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -178,6 +178,25 @@ sub check_pcm_lock()
close INNET;
}
+sub check_algo_control()
+{
+ my $file = "$kdir/include/linux/i2c.h";
+ my $need_compat = 0;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/algo_control/) {
+ $need_compat = 1;
+ last;
+ }
+ }
+
+ if ($need_compat) {
+ $out.= "\n#define NEED_ALGO_CONTROL 1\n";
+ }
+ close INNET;
+}
+
sub check_other_dependencies()
{
check_spin_lock();
@@ -189,6 +208,7 @@ sub check_other_dependencies()
check_clamp();
check_proc_create();
check_pcm_lock();
+ check_algo_control();
}
# Do the basic rules