diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-09 22:42:07 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-09 22:42:07 -0300 |
commit | 06baaa0441c7fec2a211ddf7c502f837cd988132 (patch) | |
tree | 284236ae49b1385a091119cf7b3520bc7d64552a /v4l | |
parent | e5561cf14fe189f7f0d726a1c66ffa992354ab2d (diff) | |
parent | d784aba6717da44bfef18007146f6d00280e39fe (diff) | |
download | mediapointer-dvb-s2-06baaa0441c7fec2a211ddf7c502f837cd988132.tar.gz mediapointer-dvb-s2-06baaa0441c7fec2a211ddf7c502f837cd988132.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/fusionhdtv7
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/compat.h | 331 | ||||
-rwxr-xr-x | v4l/scripts/check_deps.pl | 228 | ||||
-rwxr-xr-x | v4l/scripts/hghead.pl | 42 | ||||
-rwxr-xr-x | v4l/scripts/release.sh | 2 | ||||
-rwxr-xr-x | v4l/scripts/strip-trailing-whitespaces.sh | 6 | ||||
-rw-r--r-- | v4l/versions.txt | 2 |
6 files changed, 278 insertions, 333 deletions
diff --git a/v4l/compat.h b/v4l/compat.h index 04950ea74..b59d0ed04 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -31,248 +31,14 @@ #define cancel_delayed_work_sync cancel_rearming_delayed_work #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18) -# define minor(x) MINOR(x) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -# define DEVICE_ATTR(a,b,c,d) CLASS_DEVICE_ATTR(a,b,c,d) -# define device_create_file(a,b) class_device_create_file(a,b) -# define device_remove_file(a,b) class_device_remove_file(a,b) -# define device_register(a) class_device_register(a) -# define device_unregister(a) class_device_unregister(a) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -# include <linux/moduleparam.h> -# include <linux/delay.h> -# define need_resched() (current->need_resched) -# define work_struct tq_struct -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -# define BUG_ON(condition) do { if ((condition)!=0) BUG(); } while(0) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23) -# define irqreturn_t void -# define IRQ_RETVAL(foobar) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71) -# define strlcpy(dest,src,len) strncpy(dest,src,(len)-1) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -# define iminor(inode) minor(inode->i_rdev) -#endif - -#if defined(I2C_ADAP_CLASS_TV_ANALOG) && !defined(I2C_CLASS_TV_ANALOG) -# define I2C_CLASS_TV_ANALOG I2C_ADAP_CLASS_TV_ANALOG -# define I2C_CLASS_TV_DIGITAL I2C_ADAP_CLASS_TV_DIGITAL -#endif - #ifndef __pure # define __pure __attribute__((pure)) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) -# define __user -# define __kernel -# define __iomem -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) -# define pm_message_t u32 -# define pci_choose_state(pci_dev, state) (state) -# define PCI_D0 (0) -# define assert_spin_locked(foobar) -#endif - -/* Since v4l-dvb now includes it's own copy of linux/i2c-id.h these - are no longer necessary */ -/* -#if !defined(I2C_ALGO_SAA7134) -#define I2C_ALGO_SAA7134 I2C_HW_B_BT848 -#endif -#if !defined(I2C_HW_B_CX2388x) -# define I2C_HW_B_CX2388x I2C_HW_B_BT848 -#endif -#if !defined(I2C_HW_SAA7134) -# define I2C_HW_SAA7134 I2C_ALGO_SAA7134 -#endif -#if !defined(I2C_HW_SAA7146) -# define I2C_HW_SAA7146 I2C_ALGO_SAA7146 -#endif -#if !defined(I2C_HW_B_EM2820) -#define I2C_HW_B_EM2820 0x99 -#endif -*/ - #ifndef I2C_M_IGNORE_NAK # define I2C_M_IGNORE_NAK 0x1000 #endif -/* v4l-dvb uses an out of kernel copy of i2c-id.h, which does not have - some stuff that previous versions of i2c-id.h defined. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) && defined(LINUX_I2C_ID_H) -# define I2C_ALGO_BIT 0x010000 -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) -#define __le32 __u32 -#endif - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7)) -static inline unsigned long msecs_to_jiffies(const unsigned int m) -{ -#if HZ <= 1000 && !(1000 % HZ) - return (m + (1000 / HZ) - 1) / (1000 / HZ); -#else -#if HZ > 1000 && !(HZ % 1000) - return m * (HZ / 1000); -#else - return (m * HZ + 999) / 1000; -#endif -#endif -} -static inline unsigned int jiffies_to_msecs(const unsigned long j) -{ -#if HZ <= 1000 && !(1000 % HZ) - return (1000 / HZ) * j; -#else -#if HZ > 1000 && !(HZ % 1000) - return (j + (HZ / 1000) - 1)/(HZ / 1000); -#else - return (j * 1000) / HZ; -#endif -#endif -} -static inline void msleep(unsigned int msecs) -{ - unsigned long timeout = msecs_to_jiffies(msecs); - while (timeout) { - set_current_state(TASK_UNINTERRUPTIBLE); - timeout = schedule_timeout(timeout); - } -} -#endif - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) -static inline unsigned long msleep_interruptible(unsigned int msecs) -{ - unsigned long timeout = msecs_to_jiffies(msecs); - - while (timeout) { - set_current_state(TASK_INTERRUPTIBLE); - timeout = schedule_timeout(timeout); - } - return jiffies_to_msecs(timeout); -} -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -/* some keys from 2.6.x which are not (yet?) in 2.4.x */ -# define KEY_PLAY 207 -# define KEY_PRINT 210 -# define KEY_EMAIL 215 -# define KEY_SEARCH 217 -# define KEY_SELECT 0x161 -# define KEY_GOTO 0x162 -# define KEY_INFO 0x166 -# define KEY_CHANNEL 0x16b -# define KEY_LANGUAGE 0x170 -# define KEY_SUBTITLE 0x172 -# define KEY_ZOOM 0x174 -# define KEY_MODE 0x175 -# define KEY_TV 0x179 -# define KEY_CD 0x17f -# define KEY_TUNER 0x182 -# define KEY_TEXT 0x184 -# define KEY_DVD 0x185 -# define KEY_AUDIO 0x188 -# define KEY_VIDEO 0x189 -# define KEY_RED 0x18e -# define KEY_GREEN 0x18f -# define KEY_YELLOW 0x190 -# define KEY_BLUE 0x191 -# define KEY_CHANNELUP 0x192 -# define KEY_CHANNELDOWN 0x193 -# define KEY_RESTART 0x198 -# define KEY_SHUFFLE 0x19a -# define KEY_NEXT 0x197 -# define KEY_RADIO 0x181 -# define KEY_PREVIOUS 0x19c -# define KEY_MHP 0x16f -# define KEY_EPG 0x16d -# define KEY_FASTFORWARD 208 -# define KEY_LIST 0x18b -# define KEY_LAST 0x195 -# define KEY_CLEAR 0x163 -# define KEY_AUX 0x186 -# define KEY_SCREEN 0x177 -# define KEY_PC 0x178 -# define KEY_MEDIA 226 -# define KEY_SLOW 0x199 -# define KEY_OK 0x160 -# define KEY_DIGITS 0x19d -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) -# define KEY_SEND 231 -# define KEY_REPLY 232 -# define KEY_FORWARDMAIL 233 -# define KEY_SAVE 234 -# define KEY_DOCUMENTS 235 -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#define container_of(ptr, type, member) ({ \ - const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -#include <linux/mm.h> -static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr) -{ - return page_to_pfn(vmalloc_to_page(vmalloc_addr)); -} - -static unsigned long kvirt_to_pa(unsigned long adr) -{ - unsigned long kva, ret; - - kva = (unsigned long) page_address(vmalloc_to_page((void *)adr)); - kva |= adr & (PAGE_SIZE-1); /* restore the offset */ - ret = __pa(kva); - return ret; -} - -#ifndef wait_event_timeout -#define wait_event_timeout(wq, condition, timeout) \ -({ \ - long __ret = timeout; \ - if (!(condition)) \ - do { \ - DEFINE_WAIT(__wait); \ - for (;;) { \ - prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \ - if (condition) \ - break; \ - __ret = schedule_timeout(__ret); \ - if (!__ret) \ - break; \ - } \ - finish_wait(&wq, &__wait); \ - } while (0); \ - __ret; \ -}) -#endif - -#define remap_pfn_range remap_page_range - -#endif - /* vm_insert_page() was added in 2.6.15 */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) && defined(_LINUX_MM_H) static inline int vm_insert_page(struct vm_area_struct *vma, @@ -283,51 +49,7 @@ static inline int vm_insert_page(struct vm_area_struct *vma, } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) -#ifndef kcalloc -#define kcalloc(n,size,flags) \ -({ \ - void * __ret = NULL; \ - __ret = kmalloc(n * size, flags); \ - if (__ret) \ - memset(__ret, 0, n * size); \ - __ret; \ -}) -#endif -#endif - -/* try_to_freeze() lost its argument. Must appear after linux/sched.h */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(_LINUX_SCHED_H) -# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) -# define try_to_freeze() try_to_freeze(PF_FREEZE) -# else -# define try_to_freeze() (0) -# endif -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) -#ifndef kzalloc -#define kzalloc(size, flags) \ -({ \ - void *__ret = kmalloc(size, flags); \ - if (__ret) \ - memset(__ret, 0, size); \ - __ret; \ -}) -#endif -#endif - -/* The class_device system didn't appear until 2.5.69 */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -#define class_device_create_file(a, b) (0) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -# define class_device_create(a, b, c, d, e, f, g, h) class_simple_device_add(a, c, d, e, f, g, h) -# define class_device_destroy(a, b) class_simple_device_remove(b) -# define class_create(a, b) class_simple_create(a, b) -# define class_destroy(a) class_simple_destroy(a) -#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) # define class_device_create(a, b, c, d, e, f, g, h) class_device_create(a, c, d, e, f, g, h) #endif /* device_create/destroy added in 2.6.18 */ @@ -355,15 +77,6 @@ static inline int vm_insert_page(struct vm_area_struct *vma, #define mutex_trylock(a) down_trylock(a) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) && defined(_LINUX_SCHED_H) -static inline signed long __sched -schedule_timeout_interruptible(signed long timeout) -{ - __set_current_state(TASK_INTERRUPTIBLE); - return schedule_timeout(timeout); -} -#endif - /* New 4GB DMA zone was added in 2.6.15-rc2 */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) # define __GFP_DMA32 __GFP_DMA @@ -387,25 +100,6 @@ static inline void setup_timer(struct timer_list * timer, #define IRQF_DISABLED SA_INTERRUPT #endif -/* linux/usb.h must be included _before_ compat.h for this code to get - turned on. We can not just include usb.h here, because there is a - lot of code which will not compile if it has usb.h included, due to - conflicts with symbol names. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && \ - defined(__LINUX_USB_H) && defined(_INPUT_H) -#include <linux/input.h> -/* Found in linux/usb_input.h in 2.6.13 */ -/* Moved to linux/usb/input.h in 2.6.18 */ -static inline void -usb_to_input_id(const struct usb_device *dev, struct input_id *id) -{ - id->bustype = BUS_USB; - id->vendor = le16_to_cpu(dev->descriptor.idVendor); - id->product = le16_to_cpu(dev->descriptor.idProduct); - id->version = le16_to_cpu(dev->descriptor.bcdDevice); -} -#endif - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) # define PCIAGP_FAIL 0 @@ -433,11 +127,6 @@ typedef int bool; #define SONY_PIC_COMMAND_SETCAMERA SONYPI_COMMAND_SETCAMERA #endif -/* Parameter to pci_match_device() changed in 2.6.13-rc2 */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(LINUX_PCI_H) -#define pci_match_device(drv, dev) pci_match_device((drv)->id_table, dev) -#endif - /* pci_dev got a new revision field in 2.6.23-rc1 */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) && defined(LINUX_PCI_H) /* Just make it easier to subsitute pci_dev->revision with @@ -533,6 +222,18 @@ do { \ le16_to_cpu(get_unaligned((unsigned short *)(a))) #define put_unaligned_le16(r, a) \ put_unaligned(cpu_to_le16(r), ((unsigned short *)(a))) +#define get_unaligned_be32(a) \ + be32_to_cpu(get_unaligned((u32 *)(a))) +#define put_unaligned_be32(r, a) \ + put_unaligned(cpu_to_be32(r), ((u32 *)(a))) +#define get_unaligned_le32(a) \ + le32_to_cpu(get_unaligned((u32 *)(a))) +#define put_unaligned_le32(r, a) \ + put_unaligned(cpu_to_le32(r), ((u32 *)(a))) +#define get_unaligned_le64(a) \ + le64_to_cpu(get_unaligned((u64 *)(a))) +#define put_unaligned_le64(r, a) \ + put_unaligned(cpu_to_le64(r), ((u64 *)(a))) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) #ifdef CONFIG_PROC_FS @@ -549,7 +250,11 @@ static inline struct proc_dir_entry *proc_create(const char *a, } return e; } +#endif +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) +#ifdef CONFIG_PROC_FS static inline struct proc_dir_entry *proc_create_data(const char *a, mode_t b, struct proc_dir_entry *c, const struct file_operations *d, void *f) @@ -576,6 +281,8 @@ static inline struct proc_dir_entry *proc_create_data(const char *a, ( h ), \ ( x ) ) ) +#define dev_name(dev) ((dev)->bus_id) + #endif #endif diff --git a/v4l/scripts/check_deps.pl b/v4l/scripts/check_deps.pl new file mode 100755 index 000000000..e4d8f7a8f --- /dev/null +++ b/v4l/scripts/check_deps.pl @@ -0,0 +1,228 @@ +#!/usr/bin/perl + +# Copyright (C) 2008 Mauro Carvalho Chehab <mchehab@infradead.org> + + +use strict; +use File::Find; +use Fcntl ':mode'; +use FileHandle; + +my $debug=0; + +my $SRC = 'linux'; + +my %export; + +############# +# open_makefile were adapted from analyze_build.pl +# by Copyright (C) 2006 Trent Piepho <xyzzy@speakeasy.org> + +# Print out some extra checks of Makefile correctness +my $check = 0; + +# Root of source tree +my $root; + +# List of Makefile's opened +my %makefiles = (); + +# For each module that is made up of multiple source files, list of sources +my %multi = (); +my $multi_count = 0; + +my %config; + +my %associate; + +sub open_makefile($) { + my $file = shift; + + # only open a given Makefile once + return if exists $makefiles{$file}; + $makefiles{$file} = 1; + + $file =~ m|^(.*)/[^/]*$|; + my $dir = $1; + + print "opening $root$file (dir=$dir)\n" if ($debug > 2); + my $in = new FileHandle; + open $in, '<', "$root$file" or die "Unable to open Makefile '$root$file': $!"; + + while (<$in>) { + # print STDERR "Line: $_"; + # Skip comment and blank lines + next if (/^\s*(#.*)?$/); + m/^\s*\-?include/ and die "Can't handle includes! In $file"; + + # Handle line continuations + if (/\\\n$/) { + $_ .= <$in>; + redo; + } + # Eat line continuations in string we will parse + s/\s*\\\n\s*/ /g; + # Eat comments + s/#.*$//; + + if (/^\s*obj-(\S+)\s*([:+]?)=\s*(\S.*?)\s*$/) { + print STDERR "Should use '+=' in $file:$.\n$_\n" if ($check && $2 ne '+'); + my ($var,$targets) = ($1, $3); + if ($var =~ /\$\(CONFIG_(\S+)\)$/) { + $var = $1; + } elsif ($var !~ /^[ym]$/) { + print STDERR "Confused by obj assignment '$var' in $file:$.\n$_"; + } + foreach(split(/\s+/, $targets)) { + if (m|/$|) { # Ends in /, means it's a directory + open_makefile("$dir/$_".'Makefile'); + } elsif (/^(\S+)\.o$/) { + $config{"$dir/$1"} = $var; +# printf "%s -> %s\n", $var, $1 if $debug > 1; + } else { + print STDERR "Confused by target '$_' in $file:$.\n"; + } + } + next; + } + if (/(\S+)-objs\s*([:+]?)=\s*(\S.*?)\s*$/) { + my @files = split(/\s+/, $3); + map { s|^(.*)\.o$|$dir/\1| } @files; + if ($2 eq '+') { + # Adding to files + print STDERR "Should use ':=' in $file:$.\n$_\n" if ($check && !exists $multi{"$dir/$1"}); + push @files, @{$multi{"$dir/$1"}}; + } else { + print STDERR "Setting objects twice in $file:$.\n$_\n" if ($check && exists $multi{"$dir/$1"}); + } + $multi{"$dir/$1"} = \@files; + next; + } + if (/^\s*EXTRA_CFLAGS\s*([:+]?)=\s*(\S.*?)\s*$/) { + if ($check) { + sub allI { /^-I/ or return 0 foreach split(/\s+/, $_[0]);return 1; } + my $use = allI($2) ? ':' : '+'; + print STDERR "Should use '$use=' with EXTRA_CFLAGS in $file:$.\n$_\n" + if ($1 ne $use); + } + next; + } + print STDERR "Odd line $file:$.\n$_\n" if ($check); + } + close IN; +} + +# +############# + +sub associate_multi() +{ + foreach (keys %multi) { + my $name = $_; + my @files = @{$multi{$_}}; + map { s/^(.*)$/\1.c/ } @files; + + foreach (@files) { + my $file = $_; + my $var = $config{$name}; + $associate{$file} = $var; + printf "$var -> $file\n" if $debug > 1; + } + delete $config{$name}; + } + foreach my $file (keys %config) { + my $var = $config{$file}; + $file .= ".c"; + $associate{$file} = $var; + printf "$var -> $file\n" if $debug > 1; + } +} + +sub build_exported_symbol_list { + my $file = $File::Find::name; + + return if (!($file =~ /\.c$/)); + + open IN, $file; + while (<IN>) { + if (m/EXPORT_SYMBOL.*\(\s*([^\s\)]+)/) { + $export{$1} = $file; + printf "%s -> %s\n", $file , $1 if $debug > 1; + } + } + close IN; +} + + +sub find_usage_list { + my %depend; + my $file = $File::Find::name; + my $s; + + return if (!($file =~ /\.c$/)); + + open IN, $file; + printf "Checking symbols at $file\n" if $debug; + while (<IN>) { + foreach my $symbol (keys %export) { + my $symb_file = $export{$symbol}; + + # Doesn't search the symbol at the file that defines it + next if ($symb_file eq $file); + + if (m/($symbol)/) { + my $var = $associate{$symb_file}; + if (!$depend{$var}) { + printf "$symbol found at $file. It depends on %s\n", $associate{$symb_file} if $debug; + $depend{$var} = 1; + } + } + } + } + close IN; + + foreach (%depend) { $s .= "$_ && "; }; + $s =~ s/\&\&\ $//; + if ($s ne "") { + print $associate{$file}." depends on $s\n"; + } +} + +print <<EOL; +Dependency check tool for Kernel Symbols. + +Copyright(c) 2008 by Mauro Carvalho Chehab <mchehab\@infradead.org> +This code is licenced under the terms of GPLv2. + +This script seeks all .c files under linux/ for their exported symbols. For +each exported symbol, it will check what Kconfig symbol is associated. Then, it +will cross-check that symbol usage and output a Kconfig depencency table. + +WARNING: The result of this tool should be used just as a hint, since, due to +performance issues, and to simplify the tool, the checks will use a simple grep +for the symbol string at the .c files, instead of a real symbol cross-check. + +Also, the same symbol may appear twice with different dependencies. This is due +to the way it checks for symbols. The final dependency is the union (AND) of +all showed ones for that symbol. + +Further patches improving this tool are welcome. + +EOL + +print "Checking makefile rules..." if $debug; +open_makefile("$SRC/drivers/media/Makefile"); +print " ok\n" if $debug; + +print "Associating symbols with c files..." if $debug; +associate_multi(); +print " ok\n" if $debug; + +print "finding exported symbols at $SRC..." if $debug; +find({wanted => \&build_exported_symbol_list, no_chdir => 1}, $SRC); +print " ok\n" if $debug; + +print "finding usage of symbols at $SRC\n" if $debug; +find({wanted => \&find_usage_list, no_chdir => 1}, $SRC); +print "finished\n" if $debug; + diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl index 1eb7355c4..2450ad136 100755 --- a/v4l/scripts/hghead.pl +++ b/v4l/scripts/hghead.pl @@ -91,7 +91,8 @@ while ($line = <IN>) { } if ($tag =~ m/^subject:/) { - $subject="$arg\n"; + $subject = "$arg\n"; + $sub_ok = 1; next; } @@ -125,21 +126,18 @@ while ($line = <IN>) { next; } - if ($tag =~ m/^(acked-by|thanks-to|reviewed-by|cc):/) { + if ($tag =~ m/^(acked-by|thanks-to|reviewed-by|noticed-by|cc):/) { $signed="$signed$line"; next; } - if ($line =~ m/^[a-zA-Z\-]*:/) { - if ($line =~ m/Changeset:\s*(.*)\n/) { - $num=$1; - } - print "# $line"; - next; + if ($tag =~ m/changeset:\s*(.*)\n/) { + $num=$1; } if ($line =~ m|^(V4L\/DVB\s*\(.+\)\s*:.*\n)|) { $subject=$1; + $sub_ok = 1; $line="\n"; } @@ -151,17 +149,11 @@ while ($line = <IN>) { next; } $sub_ok=1; - substr( $subject, 0, 1 ) = uc (substr ($subject, 0, 1)); if ($subject =~ m|V4L\/DVB\s*(.+)|) { $subject=$1; } - if ($hgimport) { - $subject=$line; - next; - } - if ($line =~ m/^\n/) { - next; - } + $subject=$line; + next; } if ($noblank) { @@ -182,7 +174,8 @@ if ($from eq "") { die; } -if (!$maint_ok) { +if (!$maint_ok && $maintainer_name && $maintainer_email) { + print "#No maintainer's signature. Adding it.\n"; $signed=$signed."Signed-off-by: $maintainer_name <$maintainer_email>\n"; } @@ -191,11 +184,20 @@ if (!$signed =~ m/$from/) { die; } -$body="$from\n$body"; +$from=~s/^[\n\s]+//; +$from=~s/[\n\s]+$//; + +$subject=~s/^[\n\s]+//; +$subject=~s/[\n\s]+$//; + +$body=~s/^[\n\s]+//; $body=~s/[\n\s]+$//; + +$body="$body\n\n$signed"; + $body=~s/^[\n\s]+//; +$body=~s/[\n\s]+$//; # First from is used by hg to recognize commiter name print "#Committer: $maintainer_name <$maintainer_email>\n"; -print "$subject\n$body\n\n$signed"; - +print "$subject\n\n$from\n\n$body\n"; diff --git a/v4l/scripts/release.sh b/v4l/scripts/release.sh index 557172875..4e9c810bc 100755 --- a/v4l/scripts/release.sh +++ b/v4l/scripts/release.sh @@ -9,7 +9,7 @@ ver_cx="0.0.4" # common files files_v4l="v4l*.[ch] video-buf.[ch] videodev*.h" files_tuner="tuner.[ch] tda9887.[ch]" -files_i2c="id.h audiochip.h i2c-compat.h" +files_i2c="id.h audiochip.h" files_common="$files_v4l $files_tuner $files_i2c doc" # other files diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh index 9bd963025..cb341ce76 100755 --- a/v4l/scripts/strip-trailing-whitespaces.sh +++ b/v4l/scripts/strip-trailing-whitespaces.sh @@ -20,6 +20,12 @@ else fi for file in `eval $files`; do + case "$file" in + *.patch) + continue + ;; + esac + perl -ne ' s/[ \t]+$//; s<^ {8}> <\t>; diff --git a/v4l/versions.txt b/v4l/versions.txt index 54be82237..a31b8ca56 100644 --- a/v4l/versions.txt +++ b/v4l/versions.txt @@ -14,6 +14,8 @@ SOC_CAMERA_MT9M001 VIDEO_TCM825X # This driver requires list_first_entry USB_STKWEBCAM +#Initial version for this driver +USB_VIDEO_CLASS [2.6.20] #This driver requires HID_REQ_GET_REPORT |