diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-12-01 11:08:44 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2011-01-11 17:01:02 +0100 |
commit | 0d86d2bebb625a222f70b76972139f6a272e3e0b (patch) | |
tree | 2f8763d0041b82f41ef9b14ab6e5529a3c4b6e71 /hw/usb-bus.c | |
parent | ed5a83ddd8c1d8ec7b1015315530cf29949e7c48 (diff) |
usb: create USBPortOps, move attach there.
Create USBPortOps struct, move the attach function to that struct.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-bus.c')
-rw-r--r-- | hw/usb-bus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/usb-bus.c b/hw/usb-bus.c index af537c238f..9dc8793148 100644 --- a/hw/usb-bus.c +++ b/hw/usb-bus.c @@ -113,12 +113,14 @@ USBDevice *usb_create_simple(USBBus *bus, const char *name) } void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index, - USBDevice *pdev, usb_attachfn attach) + USBDevice *pdev, USBPortOps *ops) { port->opaque = opaque; port->index = index; - port->attach = attach; port->pdev = pdev; + port->opaque = opaque; + port->index = index; + port->ops = ops; QTAILQ_INSERT_TAIL(&bus->free, port, next); bus->nfree++; } |