diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-04-12 16:53:39 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-06-20 12:32:35 +0300 |
commit | 2eb8801650b315394ca376a56be2971c867aa9ec (patch) | |
tree | 1bd8d01f8d43149e84846c762eedc870b91e9978 /drivers/usb/dwc3/gadget.h | |
parent | usb: dwc3: gadget: pass dep as argument to endpoint command (diff) | |
download | linux-dev-2eb8801650b315394ca376a56be2971c867aa9ec.tar.xz linux-dev-2eb8801650b315394ca376a56be2971c867aa9ec.zip |
usb: dwc3: gadget: add a pointer to endpoint registers
By adding a pointer to endpoint registers' base
address, we can avoid using our controller-wide
struct dwc3 pointer for everything. At some point
this will allow us to have per-endpoint locks which
will, in turn, let us queue requests to separate
endpoints in parallel.
Because of this change our debugfs interface and io
accessors need to be changed accordingly.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.h')
-rw-r--r-- | drivers/usb/dwc3/gadget.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.h b/drivers/usb/dwc3/gadget.h index f21c0fccbebd..e4a1d974a5ae 100644 --- a/drivers/usb/dwc3/gadget.h +++ b/drivers/usb/dwc3/gadget.h @@ -95,11 +95,11 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol); * * Caller should take care of locking */ -static inline u32 dwc3_gadget_ep_get_transfer_index(struct dwc3 *dwc, u8 number) +static inline u32 dwc3_gadget_ep_get_transfer_index(struct dwc3_ep *dep) { u32 res_id; - res_id = dwc3_readl(dwc->regs, DWC3_DEPCMD(number)); + res_id = dwc3_readl(dep->regs, DWC3_DEPCMD); return DWC3_DEPCMD_GET_RSC_IDX(res_id); } |