summaryrefslogtreecommitdiff
path: root/v4l/scripts/make_config_compat.pl
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-01-02 09:35:27 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-02 09:35:27 -0200
commitc036738278216aac0276743b0eb1e88e5cfd1f25 (patch)
tree3415ee49f4624d59d60d3b39e0745315a8366426 /v4l/scripts/make_config_compat.pl
parentfc7012444ff33c182360e0bade20bd56e2a42631 (diff)
parent70e0ec035b78cab8338a5b20518bfc1d1307b7ad (diff)
downloadmediapointer-dvb-s2-c036738278216aac0276743b0eb1e88e5cfd1f25.tar.gz
mediapointer-dvb-s2-c036738278216aac0276743b0eb1e88e5cfd1f25.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/tiger
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l/scripts/make_config_compat.pl')
-rwxr-xr-xv4l/scripts/make_config_compat.pl80
1 files changed, 80 insertions, 0 deletions
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index fdbc5eaba..dc6653b0d 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -159,6 +159,82 @@ sub check_proc_create()
close INNET;
}
+sub check_pcm_lock()
+{
+ my $file = "$kdir/include/sound/pcm.h";
+ my $need_compat = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/pcm_stream_lock/) {
+ $need_compat = 0;
+ last;
+ }
+ }
+
+ if ($need_compat) {
+ $out.= "\n#define NO_PCM_LOCK 1\n";
+ }
+ 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_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_other_dependencies()
{
check_spin_lock();
@@ -169,6 +245,10 @@ sub check_other_dependencies()
check_is_singular();
check_clamp();
check_proc_create();
+ check_pcm_lock();
+ check_algo_control();
+ check_net_dev();
+ check_usb_endpoint_type();
}
# Do the basic rules