USB: usbatm: move the atm_dbg() call to use dynamic debug
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Jun 2013 18:32:53 +0000 (11:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:32:36 +0000 (16:32 -0700)
Move the atm_dbg() call to use the dynamic debug subsystem, and not rely
on CONFIG_USB_DEBUG for if things should be printed out or not.

This also means the drivers do not have to be rebuilt to get debugging
messages, important for getting information from users who can not
rebuild their kernels.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/atm/usbatm.h

index 71dd13994bbe07dc1098e12b9416571e161ed0ed..5651231a74371cc4b97a0b55769e078478158a35 100644 (file)
        atm_printk(KERN_INFO, instance , format , ## arg)
 #define atm_warn(instance, format, arg...)     \
        atm_printk(KERN_WARNING, instance , format , ## arg)
-#ifdef DEBUG
-#define atm_dbg(instance, format, arg...)      \
-       atm_printk(KERN_DEBUG, instance , format , ## arg)
-#define atm_rldbg(instance, format, arg...)    \
+#define atm_dbg(instance, format, arg...)              \
+       dynamic_pr_debug("ATM dev %d: " format ,        \
+       (instance)->atm_dev->number , ## arg)
+#define atm_rldbg(instance, format, arg...)            \
        if (printk_ratelimit())                         \
-               atm_printk(KERN_DEBUG, instance , format , ## arg)
-#else
-#define atm_dbg(instance, format, arg...)      \
-       do {} while (0)
-#define atm_rldbg(instance, format, arg...)    \
-       do {} while (0)
-#endif
+               atm_dbg(instance , format , ## arg)
 
 
 /* flags, set by mini-driver in bind() */
This page took 0.02561 seconds and 5 git commands to generate.