From 4231523c2f316072843d1c82aa9976ba2eac495b Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 20 Oct 2011 20:51:44 +0000 Subject: [PATCH] dahdi: Define pr_xxx macros if not already defined. The pr_ macros are the recommended way for subsystems to print messages but not all kernel versions DAHDI support has them defined. Signed-off-by: Shaun Ruffell Acked-by: Michael Spiceland Acked-by: Russ Meyerriecks git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10226 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- include/dahdi/kernel.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 161c7a2..e2403c1 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -1461,6 +1461,26 @@ struct mutex { #define chan_err(chan, fmt, ...) chan_printk(ERR, "", chan, fmt, \ ## __VA_ARGS__) +#ifndef pr_err +#define pr_err(fmt, ...) \ + printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) +#endif +#ifndef pr_warning +#define pr_warning(fmt, ...) \ + printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) +#endif +#ifndef pr_warn +#define pr_warn pr_warning +#endif +#ifndef pr_notice +#define pr_notice(fmt, ...) \ + printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) +#endif +#ifndef pr_info +#define pr_info(fmt, ...) \ + printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) +#endif + /* The dbg_* ones use a magical variable 'debug' and the user should be * aware of that. */