From 82753c8a0c338f489a20e0554eac589a390ac6bb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 11:02:14 -0300 Subject: backport commit 758021bfa9ea25c58e62d2f68512628b19502ce7 From: Mauro Carvalho Chehab Author: Takashi Iwai Date: Mon Jan 12 15:17:09 2009 +0100 drivers/media: Convert to snd_card_create() Convert from snd_card_new() to the new snd_card_create() function. While here, backport also cx231xx-audio upstream changes for using snd_card_create(). kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_config_compat.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'v4l/scripts') diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index 423dcff77..2fc37d06d 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -254,6 +254,25 @@ sub check_pci_ioremap_bar() close INNET; } +sub check_snd_card_create() +{ + my $file = "$kdir/include/sound/core.h"; + my $need_compat = 1; + + open IN, "<$file" or die "File not found: $file"; + while () { + if (m/snd_card_create/) { + $need_compat = 0; + last; + } + } + + if ($need_compat) { + $out.= "\n#define NEED_SND_CARD_CREATE\n"; + } + close IN; +} + sub check_other_dependencies() { check_spin_lock(); @@ -269,6 +288,7 @@ sub check_other_dependencies() check_net_dev(); check_usb_endpoint_type(); check_pci_ioremap_bar(); + check_snd_card_create(); } # Do the basic rules -- cgit v1.2.3 From d54ae5db8294db9af22f394d69591b8cf500ddc8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 11:11:08 -0300 Subject: Fix compatibility for usb_endpoint_type and 2.6.30 From: Mauro Carvalho Chehab compat.h: usb_endpoint_type can be found on ch9.h header Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_config_compat.pl | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'v4l/scripts') 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 () { - 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 () { + 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() -- cgit v1.2.3 From 8cc78392269a77c3aed220bb457e991924480779 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 11:27:26 -0300 Subject: compat.h: improve detection for need poll_schedule() From: Mauro Carvalho Chehab Priority: normal Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_config_compat.pl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'v4l/scripts') diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index e94bf2803..32b111f4e 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -274,6 +274,28 @@ sub check_snd_card_create() close IN; } +sub check_poll_schedule() +{ + + + my @files = ( "$kdir//include/linux/poll.h" ); + + foreach my $file ( @files ) { + open IN, "<$file" or die "File not found: $file"; + while () { + if (m/poll_schedule/) { + close IN; + # definition found. No need for compat + return; + } + } + close IN; + } + + # definition not found. This means that we need compat + $out.= "\n#define NEED_POLL_SCHEDULE 1\n"; +} + sub check_other_dependencies() { check_spin_lock(); @@ -290,6 +312,7 @@ sub check_other_dependencies() check_usb_endpoint_type(); check_pci_ioremap_bar(); check_snd_card_create(); + check_poll_schedule(); } # Do the basic rules -- cgit v1.2.3 From 635283a5dcc470c8dc22d6cabaf1eac4e3e08bf4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 15:03:39 -0300 Subject: fix backport compilation, when ch9.h file doesn't exist From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_config_compat.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'v4l/scripts') diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index 32b111f4e..3c2b623ca 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -218,10 +218,12 @@ sub check_net_dev() sub check_usb_endpoint_type() { + my $nfiles = 0; 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"; + open IN, "<$file" or next; + $nfiles++; while () { if (m/usb_endpoint_type/) { close IN; @@ -232,6 +234,8 @@ sub check_usb_endpoint_type() close IN; } + die "Usb headers not found" if (!$nfiles); + # definition not found. This means that we need compat $out.= "\n#define NEED_USB_ENDPOINT_TYPE 1\n"; } -- cgit v1.2.3