diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2020-07-23 16:45:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-23 17:05:28 +0200 |
commit | f39f3afdf9b12cccc42c9db7a855821794bbd76c (patch) | |
tree | 7a9bf2c7284f54f7b14b39f2fda18483891d0bfa /drivers/usb/host/xhci-dbgcap.h | |
parent | xhci: dbc: Pass dbc pointer to get_in/out_ep() helper functions to get endpoints (diff) | |
download | linux-f39f3afdf9b12cccc42c9db7a855821794bbd76c.tar.xz linux-f39f3afdf9b12cccc42c9db7a855821794bbd76c.zip |
xhci: dbc: Use dbc structure in the request completion instead of xhci_hcd
The dbc request completion callback doesn't need a xhci_hcd pointer.
The only user of the xhci_hcd pointer in dbgtty request callback was
the xhci_warn() function. Change it to dev_warn() instead.
While changing the callback function parameter to dbc in struct
xhci_requeset, move the struct xhci_request declaraion down a bit in the
header file to avoid compiler warinings
No functional changes
This change helps decoupling xhci and DbC
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200723144530.9992-18-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-dbgcap.h')
-rw-r--r-- | drivers/usb/host/xhci-dbgcap.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/usb/host/xhci-dbgcap.h b/drivers/usb/host/xhci-dbgcap.h index dc7d2d157e7b..9e3c5940f27b 100644 --- a/drivers/usb/host/xhci-dbgcap.h +++ b/drivers/usb/host/xhci-dbgcap.h @@ -84,23 +84,6 @@ enum dbc_state { DS_STALLED, }; -struct dbc_request { - void *buf; - unsigned int length; - dma_addr_t dma; - void (*complete)(struct xhci_hcd *xhci, - struct dbc_request *req); - struct list_head list_pool; - int status; - unsigned int actual; - - struct dbc_ep *dep; - struct list_head list_pending; - dma_addr_t trb_dma; - union xhci_trb *trb; - unsigned direction:1; -}; - struct dbc_ep { struct xhci_dbc *dbc; struct list_head list_pending; @@ -154,6 +137,23 @@ struct xhci_dbc { struct dbc_port port; }; +struct dbc_request { + void *buf; + unsigned int length; + dma_addr_t dma; + void (*complete)(struct xhci_dbc *dbc, + struct dbc_request *req); + struct list_head list_pool; + int status; + unsigned int actual; + + struct dbc_ep *dep; + struct list_head list_pending; + dma_addr_t trb_dma; + union xhci_trb *trb; + unsigned direction:1; +}; + #define dbc_bulkout_ctx(d) \ ((struct xhci_ep_ctx *)((d)->ctx->bytes + DBC_CONTEXT_SIZE)) #define dbc_bulkin_ctx(d) \ |