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.h | |
| parent | 5e0259e7facb6aaac326c3beef79e4d2414c38d4 (diff) | |
| download | focaccia-qemu-ab28ccc0c67f52d8966b8172108cb8a6f76e6d2a.tar.gz focaccia-qemu-ab28ccc0c67f52d8966b8172108cb8a6f76e6d2a.zip | |
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.h')
| -rw-r--r-- | hw/usb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/usb.h b/hw/usb.h index 00d2802206..0b32d77e6f 100644 --- a/hw/usb.h +++ b/hw/usb.h @@ -203,6 +203,7 @@ struct USBPort { USBDevice *dev; usb_attachfn attach; void *opaque; + USBDevice *pdev; int index; /* internal port index, may be used with the opaque */ QTAILQ_ENTRY(USBPort) next; }; @@ -312,7 +313,7 @@ USBDevice *usb_create(USBBus *bus, const char *name); USBDevice *usb_create_simple(USBBus *bus, const char *name); USBDevice *usbdevice_create(const char *cmdline); void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index, - usb_attachfn attach); + USBDevice *pdev, usb_attachfn attach); void usb_unregister_port(USBBus *bus, USBPort *port); int usb_device_attach(USBDevice *dev); int usb_device_detach(USBDevice *dev); |