diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2021-01-29 16:00:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-29 16:16:50 +0300 |
commit | d70f4231b81eeb6dd78bd913ff42729b524eec51 (patch) | |
tree | 1f0875444b4e11f36009a2d6c41d7842c4cb3c9a /drivers/usb/host/xhci-mem.c | |
parent | d4dff8043ea5b93a30cb9b19d4407bd506a6877a (diff) | |
download | linux-d70f4231b81eeb6dd78bd913ff42729b524eec51.tar.xz |
xhci: adjust parameters passed to cleanup_halted_endpoint()
Instead of passing slot id and endpoint index to
cleanup_halted_endpoint() pass the endpoint structure pointer
as it's already known.
Avoids again digging out the endpoint structure based on
slot id and endpoint index, and passing them along the
call chain for this purpose only.
Add slot_id to the virt_dev structure so that it
can easily be found from a virt_dev, or its child, the
virt_ep endpoint structure.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210129130044.206855-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index d6e2ee1f8964..c136ca0502e3 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -994,6 +994,8 @@ int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, if (!dev) return 0; + dev->slot_id = slot_id; + /* Allocate the (output) device context that will be used in the HC. */ dev->out_ctx = xhci_alloc_container_ctx(xhci, XHCI_CTX_TYPE_DEVICE, flags); if (!dev->out_ctx) |