usb: dwc3: gadget: Account for link TRB in TRBs left
authorJohn Youn <johnyoun@synopsys.com>
Fri, 20 May 2016 00:26:15 +0000 (17:26 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 20 Jun 2016 09:32:44 +0000 (12:32 +0300)
commit7d0a038b130cde7265d6bbc5e148734cb127f341
treeeaa98442860f754080f12d408711a993d2d281b9
parent32db3d9437b6bd560daeef82a8325436a4ac3366
usb: dwc3: gadget: Account for link TRB in TRBs left

The TRBs left calculation didn't account for the link TRB taking up one
spot.

If the trb_dequeue < trb_enqueue, then the result includes the link
TRB slot so it must be adjusted.

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