Revision 4706ab6c hw/usb-uhci.c

b/hw/usb-uhci.c
606 606
    UHCIState *s = port1->opaque;
607 607
    UHCIPort *port = &s->ports[port1->index];
608 608

  
609
    uhci_async_cancel_device(s, port1->dev);
610

  
609 611
    /* set connect status */
610 612
    if (port->ctrl & UHCI_PORT_CCS) {
611 613
        port->ctrl &= ~UHCI_PORT_CCS;
......
620 622
    uhci_resume(s);
621 623
}
622 624

  
625
static void uhci_child_detach(USBPort *port1, USBDevice *child)
626
{
627
    UHCIState *s = port1->opaque;
628

  
629
    uhci_async_cancel_device(s, child);
630
}
631

  
623 632
static void uhci_wakeup(USBPort *port1)
624 633
{
625 634
    UHCIState *s = port1->opaque;
......
1095 1104
    register_ioport_read(addr, 32, 1, uhci_ioport_readb, s);
1096 1105
}
1097 1106

  
1098
static void uhci_device_destroy(USBBus *bus, USBDevice *dev)
1099
{
1100
    UHCIState *s = container_of(bus, UHCIState, bus);
1101

  
1102
    uhci_async_cancel_device(s, dev);
1103
}
1104

  
1105 1107
static USBPortOps uhci_port_ops = {
1106 1108
    .attach = uhci_attach,
1107 1109
    .detach = uhci_detach,
1110
    .child_detach = uhci_child_detach,
1108 1111
    .wakeup = uhci_wakeup,
1109 1112
    .complete = uhci_async_complete,
1110 1113
};
1111 1114

  
1112 1115
static USBBusOps uhci_bus_ops = {
1113
    .device_destroy = uhci_device_destroy,
1114 1116
};
1115 1117

  
1116 1118
static int usb_uhci_common_initfn(PCIDevice *dev)

Also available in: Unified diff