diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-04-12 14:02:47 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-15 11:32:47 +0200 |
commit | 61d19bcc2322d9a99a6f2565ab3509e8cffa8fb9 (patch) | |
tree | cc84bc5d2a974806605cc89affdb50fc0e764282 /backport/backport-include/linux/printk.h | |
parent | 4928db002aba9317a61f478ac6aba455c7662241 (diff) |
backports: dissolve compat-2.6.30.h
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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/backport/backport-include/linux/printk.h b/backport/backport-include/linux/printk.h index c1108888..b97f51ea 100644 --- a/backport/backport-include/linux/printk.h +++ b/backport/backport-include/linux/printk.h @@ -39,6 +39,17 @@ do { \ #define pr_warn pr_warning #endif +#ifndef printk_once +#define printk_once(x...) ({ \ + static bool __print_once; \ + \ + if (!__print_once) { \ + __print_once = true; \ + printk(x); \ + } \ +}) +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) #define pr_emerg_once(fmt, ...) \ printk_once(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) |