diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-12-08 13:35:02 +0200 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-12-11 21:32:44 +0000 |
commit | ab28ccc0c67f52d8966b8172108cb8a6f76e6d2a (patch) | |
tree | 603989d1aa783e41ba0bb2bdaf4090ba01583118 /hw/usb-bus.c | |
parent | 5e0259e7facb6aaac326c3beef79e4d2414c38d4 (diff) |
Record which USBDevice USBPort belongs too.
Ports on root hub will have NULL here. This is needed to reconstruct
path from device to its root hub to build device path.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/usb-bus.c')
-rw-r--r-- | hw/usb-bus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/usb-bus.c b/hw/usb-bus.c index b692503f54..256b881571 100644 --- a/hw/usb-bus.c +++ b/hw/usb-bus.c @@ -110,11 +110,12 @@ USBDevice *usb_create_simple(USBBus *bus, const char *name) } void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index, - usb_attachfn attach) + USBDevice *pdev, usb_attachfn attach) { port->opaque = opaque; port->index = index; port->attach = attach; + port->pdev = pdev; QTAILQ_INSERT_TAIL(&bus->free, port, next); bus->nfree++; } |