aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-01-05 13:41:09 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-01-07 10:14:37 -0500
commit3c577a7644c6c91be70ffd59c121b5d19d381e5f (patch)
treeb9cd4a134713da041f08250b7f6687f7f02b5f95
parent16a9e7926a6c6845a98df2a6eac509c23c6206ba (diff)
downloadseabios-hppa-3c577a7644c6c91be70ffd59c121b5d19d381e5f.zip
seabios-hppa-3c577a7644c6c91be70ffd59c121b5d19d381e5f.tar.gz
seabios-hppa-3c577a7644c6c91be70ffd59c121b5d19d381e5f.tar.bz2
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 <kevin@koconnor.net>
-rw-r--r--src/hw/usb-xhci.c6
-rw-r--r--src/hw/usb.h1
2 files changed, 4 insertions, 3 deletions
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;