aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-08-11 14:36:21 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-22 21:23:04 -0400
commitcbc4663552ee476f57933920d782222d94878e7e (patch)
tree7fa60ec28e53114d239137b7cea65c66da15040c /include/linux/device.h
parent25b8a88c10770e8c3f14bf2e222691dc6e79de78 (diff)
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>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index c20dfbfc49b4..4639419522da 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -785,6 +785,8 @@ extern const char *dev_driver_string(const struct device *dev);
785 785
786#ifdef CONFIG_PRINTK 786#ifdef CONFIG_PRINTK
787 787
788extern int __dev_printk(const char *level, const struct device *dev,
789 struct va_format *vaf);
788extern int dev_printk(const char *level, const struct device *dev, 790extern int dev_printk(const char *level, const struct device *dev,
789 const char *fmt, ...) 791 const char *fmt, ...)
790 __attribute__ ((format (printf, 3, 4))); 792 __attribute__ ((format (printf, 3, 4)));
@@ -805,6 +807,9 @@ extern int _dev_info(const struct device *dev, const char *fmt, ...)
805 807
806#else 808#else
807 809
810static inline int __dev_printk(const char *level, const struct device *dev,
811 struct va_format *vaf)
812 { return 0; }
808static inline int dev_printk(const char *level, const struct device *dev, 813static inline int dev_printk(const char *level, const struct device *dev,
809 const char *fmt, ...) 814 const char *fmt, ...)
810 __attribute__ ((format (printf, 3, 4))); 815 __attribute__ ((format (printf, 3, 4)));