UPSTREAM: usb: dwc3: gadget: move % operation to increment helpers
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 5 Apr 2016 10:14:31 +0000 (13:14 +0300)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
commit7e5be7c0a5aed8fcdd6f82869009cc3a79768429
tree69da10c115e977e724fc1bd8b2a6220ecd90291f
parentdded20cf15f3711b4d41139dadff6f52d523a4d8
UPSTREAM: usb: dwc3: gadget: move % operation to increment helpers

By moving our % DWC3_NUM_TRB operation to the
increment helpers, the rest of the driver can be
simplified.

It's also a good practice to make sure we will have
a single place dealing with details about how to
increment our enqueue and dequeue pointers.

Change-Id: I4a218a52f6d7c8c2797c64772e25dc734fc6c861
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit 4faf75504a7db790483aa419d8f61e58cec4934c)
drivers/usb/dwc3/gadget.c