aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-12-04 10:55:47 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:44:33 -0500
commitd0d85ff989222f08dd1fa66321fef5567bbc4a7b (patch)
tree77af68b3dcd51d95c231025dcb3e4dd3bd21b285 /include/linux/device.h
parentb9daa99ee533578e3f88231e7a16784dcb44ec42 (diff)
Make DEBUG take precedence over DYNAMIC_PRINTK_DEBUG
Statically defined DEBUG should take precedence over dynamically enabled debugging; otherwise adding DEBUG (like, for example, via CONFIG_DEBUG_KOBJECT) does not have the expected result of printing pr_debug() and dev_dbg() messages unconditionally. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-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.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index e21b5d69d67c..b97a0cf1eb05 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -553,13 +553,13 @@ extern const char *dev_driver_string(const struct device *dev);
553#define dev_info(dev, format, arg...) \ 553#define dev_info(dev, format, arg...) \
554 dev_printk(KERN_INFO , dev , format , ## arg) 554 dev_printk(KERN_INFO , dev , format , ## arg)
555 555
556#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) 556#if defined(DEBUG)
557#define dev_dbg(dev, format, arg...) \
558 dev_printk(KERN_DEBUG , dev , format , ## arg)
559#elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
557#define dev_dbg(dev, format, ...) do { \ 560#define dev_dbg(dev, format, ...) do { \
558 dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ 561 dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
559 } while (0) 562 } while (0)
560#elif defined(DEBUG)
561#define dev_dbg(dev, format, arg...) \
562 dev_printk(KERN_DEBUG , dev , format , ## arg)
563#else 563#else
564#define dev_dbg(dev, format, arg...) \ 564#define dev_dbg(dev, format, arg...) \
565 ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; }) 565 ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })