usb: dwc3: gadget: simplify dwc3_ep_prev_trb()
commit45438a0cd9c2b80917047b77fab1ff46cf710748
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 11 Aug 2016 09:26:59 +0000 (11 12:26 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 22 Aug 2016 07:45:37 +0000 (22 10:45 +0300)
treede255789b4e139a4c8f93b5e64181f012c7505b9
parent737f1ae2556a5d219c24fbea2e1c63b7d9e10869
usb: dwc3: gadget: simplify dwc3_ep_prev_trb()

We always need to decrement our index by at least
one. Simplify the implementation by using a
temporary local variable and making sure that we
will always decrement one extra if tmp == 0.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c