diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-04-13 15:18:04 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-15 11:32:48 +0200 |
commit | 4298b3e5fb8e8b4eb171b895a271d0f5f4b18c38 (patch) | |
tree | cac6c9ac5bf2a671f445a1b0d38d5f3e866e2e24 /backport/backport-include/linux/printk.h | |
parent | 7d82f0ea460fd5677109fe964fb0b4d4a8fda5ff (diff) |
backports: avoid pr_fmt warning from our export.h
On old kernels, linux/export.h didn't exist and we need
to include linux/module.h instead. That includes a lot
though and thus defines pr_fmt already. Avoid redefine
warnings by checking if it's defined before and if not
undefining it afterwards.
However, to then avoid issues with kernel.h/printk.h
not defining it again, we need to override there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport/backport-include/linux/printk.h')
-rw-r--r-- | backport/backport-include/linux/printk.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/backport/backport-include/linux/printk.h b/backport/backport-include/linux/printk.h index 00d86f36..6bc99317 100644 --- a/backport/backport-include/linux/printk.h +++ b/backport/backport-include/linux/printk.h @@ -9,9 +9,7 @@ #include <linux/kernel.h> #endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35)) */ -#ifndef pr_fmt -#define pr_fmt(fmt) fmt -#endif +/* see pr_fmt at end of file */ #if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) /* backports 7a555613 */ @@ -100,3 +98,8 @@ int no_printk(const char *s, ...) { return 0; } #endif #endif /* _COMPAT_LINUX_PRINTK_H */ + +/* This must be outside -- see also kernel.h */ +#ifndef pr_fmt +#define pr_fmt(fmt) fmt +#endif |