lkml.org 
[lkml]   [2008]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [01/03] USB: add CONFIG_USB_DEBUG_MESSAGES and usb_dbg()
On Fri, Aug 08, 2008 at 06:39:17PM -0700, Greg KH wrote:
> --- a/drivers/usb/core/usb.h
> +++ b/drivers/usb/core/usb.h
> @@ -132,6 +132,28 @@ static inline int is_active(const struct
> /* for labeling diagnostics */
> extern const char *usbcore_name;
>
> +/* USB debugging */
> +/* if debug is on or not for the USB core */
> +extern int usb_debug;
> +
> +#if defined(CONFIG_USB_DEBUG_MESSAGES)
> +/* macro for debugging */
> +#define usb_dbg(dev, format, arg...) \
> + ({ \
> + if (usb_debug) \

maybe unlikely here?

> + dev_printk(KERN_DEBUG , dev , format , ## arg); \
> + 0; \
> + })
> +#else
> +#define usb_dbg(dev, format, arg...) \
> + ({ \
> + if (0) \
> + dev_printk(KERN_DEBUG , dev , format , ## arg); \
> + 0; \
> + })
> +#endif
> +
> +
> /* sysfs stuff */
> extern struct attribute_group *usb_device_groups[];
> extern struct attribute_group *usb_interface_groups[];


\
 
 \ /
  Last update: 2008-08-09 17:07    [W:0.118 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site