From 0d86d2bebb625a222f70b76972139f6a272e3e0b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 1 Dec 2010 11:08:44 +0100 Subject: usb: create USBPortOps, move attach there. Create USBPortOps struct, move the attach function to that struct. Signed-off-by: Gerd Hoffmann --- hw/usb-bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hw/usb-bus.c') diff --git a/hw/usb-bus.c b/hw/usb-bus.c index af537c2..9dc8793 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++; } -- cgit v1.1