summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
Diffstat (limited to 'v4l')
-rw-r--r--v4l/compat.h1
-rwxr-xr-xv4l/scripts/strip-trailing-whitespaces.sh22
2 files changed, 14 insertions, 9 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index 774afc8da..9efcfebd1 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -276,6 +276,7 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
#define mutex_unlock(a) up(a)
#define mutex_lock(a) down(a)
#define mutex_init(a) init_MUTEX(a)
+#define mutex_trylock(a) down_trylock(a)
#endif
#endif
diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh
index ea3e4defa..1a23e436d 100755
--- a/v4l/scripts/strip-trailing-whitespaces.sh
+++ b/v4l/scripts/strip-trailing-whitespaces.sh
@@ -10,21 +10,25 @@ for file in `find linux -type d | grep -v CVS | grep -v .cvsignore` ; do
done
for file in `find linux -type f | grep -v CVS | grep -v .cvsignore` ; do
tmpfile="$WORK/${file}.$$"
- perl -ne 's/[ \t]+$//;
+ perl -ne 's/[ \t]+$//;
s/^\ \ \ \ \ \ \ \ /\t/;
s/^\ \ \ \ \ \ \ \t/\t/;
s/^\ \ \ \ \ \ \t/\t/;
s/^\ \ \ \ \ \t/\t/;
s/^\ \ \ \t/\t/;
s/^\ \ \t/\t/;
- s/^\ \t/\t/;
- s/\t\ \ \ \ \ \ \ \ /\t\t/g;
- s/\t\ \ \ \ \ \ \ \t/\t\t/g;
- s/\t\ \ \ \ \ \ \t/\t\t/g;
- s/\t\ \ \ \ \ \t/\t\t/g;
- s/\t\ \ \ \t/\t\t/g;
- s/\t\ \ \t/\t\t/g;
- s/\t\ \t/\t\t/g;
+ s/^\ \t/\t/;
+ $m=1;
+ while ($m>0) {
+ $m=0;
+ $m= s/\t\ \ \ \ \ \ \ \ /\t\t/g;
+ $m=$m+s/\t\ \ \ \ \ \ \ \t/\t\t/g;
+ $m=$m+s/\t\ \ \ \ \ \ \t/\t\t/g;
+ $m=$m+s/\t\ \ \ \ \ \t/\t\t/g;
+ $m=$m+s/\t\ \ \ \t/\t\t/g;
+ $m=$m+s/\t\ \ \t/\t\t/g;
+ $m=$m+s/\t\ \t/\t\t/g;
+ }
print' < "${file}" > "${tmpfile}"
diff -u "${file}" "${tmpfile}" | sed \
-e "s|^--- ${file}|--- ${file}.orig|" \