mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
switch usb bus to inplace allocation.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
ca9c39faed
commit
b2317837f0
5 changed files with 12 additions and 15 deletions
|
@ -65,7 +65,7 @@ enum ohci_type {
|
|||
};
|
||||
|
||||
typedef struct {
|
||||
USBBus *bus;
|
||||
USBBus bus;
|
||||
qemu_irq irq;
|
||||
enum ohci_type type;
|
||||
int mem;
|
||||
|
@ -1690,10 +1690,10 @@ static void usb_ohci_init(OHCIState *ohci, DeviceState *dev,
|
|||
ohci->irq = irq;
|
||||
ohci->type = type;
|
||||
|
||||
ohci->bus = usb_bus_new(dev);
|
||||
usb_bus_new(&ohci->bus, dev);
|
||||
ohci->num_ports = num_ports;
|
||||
for (i = 0; i < num_ports; i++) {
|
||||
usb_register_port(ohci->bus, &ohci->rhport[i].port, ohci, i, ohci_attach);
|
||||
usb_register_port(&ohci->bus, &ohci->rhport[i].port, ohci, i, ohci_attach);
|
||||
}
|
||||
|
||||
ohci->async_td = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue