From 26f1f9728e5e3fdea7f573b5b159089b3fea1a6d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 7 Jul 2005 13:09:15 +0000 Subject: * scripts/buildpatch: - Added code to eliminate BTTV check version when submiting pathes to new kernel. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/buildpatch | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'v4l/scripts/buildpatch') diff --git a/v4l/scripts/buildpatch b/v4l/scripts/buildpatch index 0778ee1ee..6cffe863a 100644 --- a/v4l/scripts/buildpatch +++ b/v4l/scripts/buildpatch @@ -62,6 +62,17 @@ sub filter_source ($$) { if ($line =~ m/^#include \"compat.h\"/) { next; } + if ($line =~ /^#if.*BTTV_VERSION_CODE/) { + chomp($line); + $state = "if"; + $line =~ s@^#if\s*@@; + $line =~ s@BTTV_VERSION_CODE@\$CODE@; + $line =~ s@KERNEL_VERSION\((\d+),\s*(\d+),\s*(\d+)\)@ + sprintf("%d",$1*65536 + $2*256 + $3) @e; + $if = eval $line; + print OUT "/* BP #if $if ($line) */\n" if $DEBUG; + next; + } if ($line =~ /^#if.*LINUX_VERSION_CODE/) { chomp($line); $line =~ s@^#if\s*@@; -- cgit v1.2.3