summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci-dbgcap.h
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2020-07-23 17:45:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-23 18:05:28 +0300
commite0aa56dc7b18c80b12a9afd23d90aa6d186f639a (patch)
treea3a7f3ce83047b4e566e945391df071ecf46828e /drivers/usb/host/xhci-dbgcap.h
parent11e229a7585160c33228a9789405a504b8150525 (diff)
downloadlinux-e0aa56dc7b18c80b12a9afd23d90aa6d186f639a.tar.xz
xhci: dbc: simplify dbc requests allocation and queueing
Don't pass endpoint pointer, dbctty should not be aware of struct dbc_ep, knowing the direction is enough. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20200723144530.9992-23-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.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/host/xhci-dbgcap.h b/drivers/usb/host/xhci-dbgcap.h
index 9e3c5940f27b..fe360cf712c1 100644
--- a/drivers/usb/host/xhci-dbgcap.h
+++ b/drivers/usb/host/xhci-dbgcap.h
@@ -88,7 +88,7 @@ struct dbc_ep {
struct xhci_dbc *dbc;
struct list_head list_pending;
struct xhci_ring *ring;
- unsigned direction:1;
+ unsigned int direction:1;
};
#define DBC_QUEUE_SIZE 16
@@ -147,7 +147,7 @@ struct dbc_request {
int status;
unsigned int actual;
- struct dbc_ep *dep;
+ struct xhci_dbc *dbc;
struct list_head list_pending;
dma_addr_t trb_dma;
union xhci_trb *trb;
@@ -196,9 +196,11 @@ int xhci_dbc_tty_register_driver(struct xhci_hcd *xhci);
void xhci_dbc_tty_unregister_driver(void);
int xhci_dbc_tty_register_device(struct xhci_dbc *dbc);
void xhci_dbc_tty_unregister_device(struct xhci_dbc *dbc);
-struct dbc_request *dbc_alloc_request(struct dbc_ep *dep, gfp_t gfp_flags);
-void dbc_free_request(struct dbc_ep *dep, struct dbc_request *req);
-int dbc_ep_queue(struct dbc_ep *dep, struct dbc_request *req, gfp_t gfp_flags);
+struct dbc_request *dbc_alloc_request(struct xhci_dbc *dbc,
+ unsigned int direction,
+ gfp_t flags);
+void dbc_free_request(struct dbc_request *req);
+int dbc_ep_queue(struct dbc_request *req);
#ifdef CONFIG_PM
int xhci_dbc_suspend(struct xhci_hcd *xhci);
int xhci_dbc_resume(struct xhci_hcd *xhci);