summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_debug.h
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2010-09-24 13:44:02 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:21:52 -0700
commitd613746d8bc3a2904d4585d7efd7f457d9db6fb9 (patch)
tree2252b919e8d5c3a8ba1eda0e671a3813456d784e /drivers/usb/musb/musb_debug.h
parente06ea97fa47611992a5a61058729cf8e83bf6fda (diff)
downloadlwn-d613746d8bc3a2904d4585d7efd7f457d9db6fb9.tar.gz
lwn-d613746d8bc3a2904d4585d7efd7f457d9db6fb9.zip
USB: musb: make DBG() calls actually depend on CONFIG_USB_MUSB_DEBUG
Enabling CONFIG_USB_MUSB_DEBUG option causes -DDEBUG to be added to gcc's command line, however the DBG() macro doesn't depend on DEBUG, so that the debugging messages get printed regardless of the option, and I don't think that this was intended. Get rid of otherwise unused xprintk() macro and make DBG() macro directly call pr_debug() which only results in the actual code generated if DEBUG is defined. This change makes musb_hdrc.o ~30% less in size with CONFIG_USB_MUSB_DEBUG disabled (in host mode). Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/musb_debug.h')
-rw-r--r--drivers/usb/musb/musb_debug.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/musb/musb_debug.h b/drivers/usb/musb/musb_debug.h
index d73afdbde3ee..94f6973cf8f7 100644
--- a/drivers/usb/musb/musb_debug.h
+++ b/drivers/usb/musb/musb_debug.h
@@ -42,11 +42,10 @@
#define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args)
#define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
-#define xprintk(level, facility, format, args...) do { \
- if (_dbg_level(level)) { \
- printk(facility "%s %d: " format , \
- __func__, __LINE__ , ## args); \
- } } while (0)
+#define DBG(level, format, args...) do { \
+ if (_dbg_level(level)) \
+ pr_debug("%s %d: " format, __func__, __LINE__, ## args); \
+ } while (0)
extern unsigned musb_debug;
@@ -55,8 +54,6 @@ static inline int _dbg_level(unsigned l)
return musb_debug >= l;
}
-#define DBG(level, fmt, args...) xprintk(level, KERN_DEBUG, fmt, ## args)
-
extern const char *otg_state_string(struct musb *);
#ifdef CONFIG_DEBUG_FS