aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage/debug.h')
-rw-r--r--drivers/usb/storage/debug.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h
index dbb985d52423..b1273f03e223 100644
--- a/drivers/usb/storage/debug.h
+++ b/drivers/usb/storage/debug.h
@@ -47,15 +47,22 @@
47#define USB_STORAGE "usb-storage: " 47#define USB_STORAGE "usb-storage: "
48 48
49#ifdef CONFIG_USB_STORAGE_DEBUG 49#ifdef CONFIG_USB_STORAGE_DEBUG
50void usb_stor_show_command(struct scsi_cmnd *srb); 50void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb);
51void usb_stor_show_sense( unsigned char key, 51void usb_stor_show_sense(const struct us_data *us, unsigned char key,
52 unsigned char asc, unsigned char ascq ); 52 unsigned char asc, unsigned char ascq);
53#define US_DEBUGP(x...) printk( KERN_DEBUG USB_STORAGE x ) 53__printf(2, 3) int usb_stor_dbg(const struct us_data *us,
54#define US_DEBUGPX(x...) printk( x ) 54 const char *fmt, ...);
55#define US_DEBUG(x) x 55
56#define US_DEBUGPX(fmt, ...) printk(fmt, ##__VA_ARGS__)
57#define US_DEBUG(x) x
56#else 58#else
57#define US_DEBUGP(x...) 59__printf(2, 3)
58#define US_DEBUGPX(x...) 60static inline int _usb_stor_dbg(const struct us_data *us,
61 const char *fmt, ...) {return 1;}
62#define usb_stor_dbg(us, fmt, ...) \
63 do { if (0) _usb_stor_dbg(us, fmt, ##__VA_ARGS__); } while (0)
64#define US_DEBUGPX(fmt, ...) \
65 do { if (0) printk(fmt, ##__VA_ARGS__); } while (0)
59#define US_DEBUG(x) 66#define US_DEBUG(x)
60#endif 67#endif
61 68