diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/printk.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index 3f370adb90..2120419272 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -74,6 +74,18 @@ static inline int pr_print(int level, const char *format, ...) #define dev_vdbg(dev, format, arg...) \ __dev_printf(8, (dev) , format , ## arg) +#if LOGLEVEL >= MSG_ERR +int dev_err_probe(const struct device_d *dev, int err, const char *fmt, ...) + __attribute__ ((format(__printf__, 3, 4))); +#elif !defined(dev_err_probe) +static int dev_err_probe(const struct device_d *dev, int err, const char *fmt, ...) + __attribute__ ((format(__printf__, 3, 4))); +static inline int dev_err_probe(const struct device_d *dev, int err, const char *fmt, ...) +{ + return err; +} +#endif + #define __pr_printk(level, format, args...) \ ({ \ (level) <= LOGLEVEL ? pr_print((level), (format), ##args) : 0; \ |