aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-05-29 10:23:25 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-29 10:23:25 (GMT)
commit0cd240d6e3b13fa6dbca6f96ffd6ea73397b044b (patch)
treeae4af54e2716048a3a9a8513aca08c336123da41
parent49f0b218f5d65770fb7b33521a2cb4d1194383b3 (diff)
Remove warnings for macros already defined
On some distro-patched kernels, pr_warn and pr_err were backported. Fix the build logic to avoid warnings like: In file included from <command-line>:0: /home/v4l/media_build/v4l/compat.h:324:1: warning: "pr_warn" redefined Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--v4l/compat.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index 02e374d..7ae36f7 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -310,17 +310,18 @@ do { \
p->length = sz; \
p->offset = off; \
} while (0)
+#endif
+#ifndef pr_err
#define pr_err(fmt, arg...) \
printk(KERN_ERR fmt, ##arg)
#endif
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
#define noop_llseek NULL
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
+#ifndef pr_warn
#define pr_warn(fmt, arg...) \
printk(KERN_WARNING fmt, ##arg)
#endif

Privacy Policy