diff options
author | Felipe Balbi | 2016-05-23 13:16:19 +0200 |
---|---|---|
committer | Felipe Balbi | 2016-06-20 11:32:41 +0200 |
commit | 71f7e7027028d5a8ef15dccc587dbd6c6b7f544f (patch) | |
tree | 01f58bc5278100a9e27305c92aceaa54ab62e285 /drivers/usb/dwc3/debug.h | |
parent | usb: dwc3: gadget: remove udelay() from generic cmd (diff) | |
download | kernel-qcow2-linux-71f7e7027028d5a8ef15dccc587dbd6c6b7f544f.tar.gz kernel-qcow2-linux-71f7e7027028d5a8ef15dccc587dbd6c6b7f544f.tar.xz kernel-qcow2-linux-71f7e7027028d5a8ef15dccc587dbd6c6b7f544f.zip |
usb: dwc3: gadget: improve gcmd trace
Just like we did for endpoint commands, let's have a
single trace output for the command and its
status. This will improve trace readability
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/debug.h')
-rw-r--r-- | drivers/usb/dwc3/debug.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h index 8eed4c7cc76b..22dfc3dd6a13 100644 --- a/drivers/usb/dwc3/debug.h +++ b/drivers/usb/dwc3/debug.h @@ -296,6 +296,20 @@ static inline const char *dwc3_ep_cmd_status_string(int status) } } +static inline const char *dwc3_gadget_generic_cmd_status_string(int status) +{ + switch (status) { + case -ETIMEDOUT: + return "Timed Out"; + case 0: + return "Successful"; + case 1: + return "Error"; + default: + return "UNKNOWN"; + } +} + void dwc3_trace(void (*trace)(struct va_format *), const char *fmt, ...); #ifdef CONFIG_DEBUG_FS |