diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2012-03-08 07:49:09 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-03-10 20:36:55 -0500 |
commit | ea2747861bd450994196e7bce9b493198c14a049 (patch) | |
tree | 404b87cbcd872663e544e2c26f0e11f2e5a96f10 /src/usb-hub.c | |
parent | 6a8e8956b77137229bb2d69eb208da0abbfe0fda (diff) | |
download | seabios-hppa-ea2747861bd450994196e7bce9b493198c14a049.zip seabios-hppa-ea2747861bd450994196e7bce9b493198c14a049.tar.gz seabios-hppa-ea2747861bd450994196e7bce9b493198c14a049.tar.bz2 |
usb: Build path via chain of usbdevice_s.
Instead of building a dummy u64 with the path, construct the path via
the 'struct usbdevice_s' links.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/usb-hub.c')
-rw-r--r-- | src/usb-hub.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usb-hub.c b/src/usb-hub.c index caa6a3b..6f1aaa1 100644 --- a/src/usb-hub.c +++ b/src/usb-hub.c @@ -31,7 +31,7 @@ set_port_feature(struct usbhub_s *hub, int port, int feature) req.wIndex = port + 1; req.wLength = 0; mutex_lock(&hub->lock); - int ret = send_default_control(hub->pipe, &req, NULL); + int ret = send_default_control(hub->usbdev->defpipe, &req, NULL); mutex_unlock(&hub->lock); return ret; } @@ -46,7 +46,7 @@ clear_port_feature(struct usbhub_s *hub, int port, int feature) req.wIndex = port + 1; req.wLength = 0; mutex_lock(&hub->lock); - int ret = send_default_control(hub->pipe, &req, NULL); + int ret = send_default_control(hub->usbdev->defpipe, &req, NULL); mutex_unlock(&hub->lock); return ret; } @@ -61,7 +61,7 @@ get_port_status(struct usbhub_s *hub, int port, struct usb_port_status *sts) req.wIndex = port + 1; req.wLength = sizeof(*sts); mutex_lock(&hub->lock); - int ret = send_default_control(hub->pipe, &req, sts); + int ret = send_default_control(hub->usbdev->defpipe, &req, sts); mutex_unlock(&hub->lock); return ret; } @@ -171,7 +171,7 @@ usb_hub_init(struct usbdevice_s *usbdev) struct usbhub_s hub; memset(&hub, 0, sizeof(hub)); - hub.pipe = usbdev->defpipe; + hub.usbdev = usbdev; hub.cntl = usbdev->defpipe->cntl; hub.powerwait = desc.bPwrOn2PwrGood * 2; hub.portcount = desc.bNbrPorts; |