From: Kevin O'Connor Date: Tue, 5 Jan 2016 18:41:09 +0000 (-0500) Subject: usb: Remove usbdev->slotid field X-Git-Tag: rel-1.10.0~112 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3c577a7644c6c91be70ffd59c121b5d19d381e5f;p=seabios.git usb: Remove usbdev->slotid field The usbdev->slotid field is xhci specific and on xhci it is always reachable from usbdev->defpipe->slotid. Signed-off-by: Kevin O'Connor --- diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c index 3359cff..089cae7 100644 --- a/src/hw/usb-xhci.c +++ b/src/hw/usb-xhci.c @@ -1006,9 +1006,11 @@ xhci_alloc_pipe(struct usbdevice_s *usbdev free(dev); goto fail; } - pipe->slotid = usbdev->slotid = slotid; + pipe->slotid = slotid; } else { - pipe->slotid = usbdev->slotid; + struct xhci_pipe *defpipe = container_of( + usbdev->defpipe, struct xhci_pipe, pipe); + pipe->slotid = defpipe->slotid; // Send configure command. int cc = xhci_cmd_configure_endpoint(xhci, pipe->slotid, in); if (cc != CC_SUCCESS) { diff --git a/src/hw/usb.h b/src/hw/usb.h index efb5e6f..94e12b2 100644 --- a/src/hw/usb.h +++ b/src/hw/usb.h @@ -22,7 +22,6 @@ struct usb_pipe { struct usbdevice_s { struct usbhub_s *hub; struct usb_pipe *defpipe; - u32 slotid; u32 port; struct usb_config_descriptor *config; struct usb_interface_descriptor *iface;