From 0d92ed3022694aa6ec9172938e999871fa04f711 Mon Sep 17 00:00:00 2001 From: pbrook Date: Sun, 21 May 2006 16:30:15 +0000 Subject: OHCI USB host emulation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1928 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/usb-uhci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'hw/usb-uhci.c') diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index a18833d..d3358fe 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -638,11 +638,10 @@ static void uhci_map(PCIDevice *pci_dev, int region_num, register_ioport_read(addr, 32, 1, uhci_ioport_readb, s); } -void usb_uhci_init(PCIBus *bus, USBPort **usb_ports, int devfn) +void usb_uhci_init(PCIBus *bus, int devfn) { UHCIState *s; uint8_t *pci_conf; - UHCIPort *port; int i; s = (UHCIState *)pci_register_device(bus, @@ -662,11 +661,7 @@ void usb_uhci_init(PCIBus *bus, USBPort **usb_ports, int devfn) pci_conf[0x60] = 0x10; // release number for(i = 0; i < NB_PORTS; i++) { - port = &s->ports[i]; - port->port.opaque = s; - port->port.index = i; - port->port.attach = uhci_attach; - usb_ports[i] = &port->port; + qemu_register_usb_port(&s->ports[i].port, s, i, uhci_attach); } s->frame_timer = qemu_new_timer(vm_clock, uhci_frame_timer, s); -- cgit v1.1