dynamic_debug: Add __dynamic_dev_dbg
Unlike dynamic_pr_debug, dynamic uses of dev_dbg can not currently add task_pid/KBUILD_MODNAME/__func__/__LINE__ to selected debug output. Add a new function similar to dynamic_pr_debug to optionally emit these prefixes. Cc: Aloisio Almeida <aloisio.almeida@openbossa.org> Noticed-by: Aloisio Almeida <aloisio.almeida@openbossa.org> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
25b8a88c10
commit
cbc4663552
@@ -785,6 +785,8 @@ extern const char *dev_driver_string(const struct device *dev);
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
|
||||
extern int __dev_printk(const char *level, const struct device *dev,
|
||||
struct va_format *vaf);
|
||||
extern int dev_printk(const char *level, const struct device *dev,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
@@ -805,6 +807,9 @@ extern int _dev_info(const struct device *dev, const char *fmt, ...)
|
||||
|
||||
#else
|
||||
|
||||
static inline int __dev_printk(const char *level, const struct device *dev,
|
||||
struct va_format *vaf)
|
||||
{ return 0; }
|
||||
static inline int dev_printk(const char *level, const struct device *dev,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
|
Reference in New Issue
Block a user