diff options
Diffstat (limited to 'drivers/usb/host/ohci-dbg.c')
-rw-r--r-- | drivers/usb/host/ohci-dbg.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c index 5179fcd73d8a..e4bcb62b930a 100644 --- a/drivers/usb/host/ohci-dbg.c +++ b/drivers/usb/host/ohci-dbg.c | |||
@@ -82,6 +82,14 @@ urb_print(struct urb * urb, char * str, int small, int status) | |||
82 | ohci_dbg(ohci,format, ## arg ); \ | 82 | ohci_dbg(ohci,format, ## arg ); \ |
83 | } while (0); | 83 | } while (0); |
84 | 84 | ||
85 | /* Version for use where "next" is the address of a local variable */ | ||
86 | #define ohci_dbg_nosw(ohci, next, size, format, arg...) \ | ||
87 | do { \ | ||
88 | unsigned s_len; \ | ||
89 | s_len = scnprintf(*next, *size, format, ## arg); \ | ||
90 | *size -= s_len; *next += s_len; \ | ||
91 | } while (0); | ||
92 | |||
85 | 93 | ||
86 | static void ohci_dump_intr_mask ( | 94 | static void ohci_dump_intr_mask ( |
87 | struct ohci_hcd *ohci, | 95 | struct ohci_hcd *ohci, |
@@ -653,7 +661,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf) | |||
653 | 661 | ||
654 | /* dump driver info, then registers in spec order */ | 662 | /* dump driver info, then registers in spec order */ |
655 | 663 | ||
656 | ohci_dbg_sw (ohci, &next, &size, | 664 | ohci_dbg_nosw(ohci, &next, &size, |
657 | "bus %s, device %s\n" | 665 | "bus %s, device %s\n" |
658 | "%s\n" | 666 | "%s\n" |
659 | "%s\n", | 667 | "%s\n", |
@@ -672,7 +680,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf) | |||
672 | 680 | ||
673 | /* hcca */ | 681 | /* hcca */ |
674 | if (ohci->hcca) | 682 | if (ohci->hcca) |
675 | ohci_dbg_sw (ohci, &next, &size, | 683 | ohci_dbg_nosw(ohci, &next, &size, |
676 | "hcca frame 0x%04x\n", ohci_frame_no(ohci)); | 684 | "hcca frame 0x%04x\n", ohci_frame_no(ohci)); |
677 | 685 | ||
678 | /* other registers mostly affect frame timings */ | 686 | /* other registers mostly affect frame timings */ |