aboutsummaryrefslogtreecommitdiff
path: root/hw/char
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/ipack.c5
-rw-r--r--hw/char/ipack.h3
-rw-r--r--hw/char/tpci200.c2
-rw-r--r--hw/char/virtio-serial-bus.c4
4 files changed, 8 insertions, 6 deletions
diff --git a/hw/char/ipack.c b/hw/char/ipack.c
index f890471db5..b7e45bedb2 100644
--- a/hw/char/ipack.c
+++ b/hw/char/ipack.c
@@ -24,11 +24,12 @@ IPackDevice *ipack_device_find(IPackBus *bus, int32_t slot)
return NULL;
}
-void ipack_bus_new_inplace(IPackBus *bus, DeviceState *parent,
+void ipack_bus_new_inplace(IPackBus *bus, size_t bus_size,
+ DeviceState *parent,
const char *name, uint8_t n_slots,
qemu_irq_handler handler)
{
- qbus_create_inplace(&bus->qbus, TYPE_IPACK_BUS, parent, name);
+ qbus_create_inplace(bus, bus_size, TYPE_IPACK_BUS, parent, name);
bus->n_slots = n_slots;
bus->set_irq = handler;
}
diff --git a/hw/char/ipack.h b/hw/char/ipack.h
index f2b7a12e05..f8dc0f242a 100644
--- a/hw/char/ipack.h
+++ b/hw/char/ipack.h
@@ -72,7 +72,8 @@ extern const VMStateDescription vmstate_ipack_device;
VMSTATE_STRUCT(_field, _state, 1, vmstate_ipack_device, IPackDevice)
IPackDevice *ipack_device_find(IPackBus *bus, int32_t slot);
-void ipack_bus_new_inplace(IPackBus *bus, DeviceState *parent,
+void ipack_bus_new_inplace(IPackBus *bus, size_t bus_size,
+ DeviceState *parent,
const char *name, uint8_t n_slots,
qemu_irq_handler handler);
diff --git a/hw/char/tpci200.c b/hw/char/tpci200.c
index d9e17b2956..e04ff26019 100644
--- a/hw/char/tpci200.c
+++ b/hw/char/tpci200.c
@@ -607,7 +607,7 @@ static int tpci200_initfn(PCIDevice *pci_dev)
pci_register_bar(&s->dev, 4, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->las2);
pci_register_bar(&s->dev, 5, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->las3);
- ipack_bus_new_inplace(&s->bus, DEVICE(&s->dev), NULL,
+ ipack_bus_new_inplace(&s->bus, sizeof(s->bus), DEVICE(pci_dev), NULL,
N_MODULES, tpci200_set_irq);
return 0;
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index f23f555dde..703f026370 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -911,8 +911,8 @@ static int virtio_serial_device_init(VirtIODevice *vdev)
sizeof(struct virtio_console_config));
/* Spawn a new virtio-serial bus on which the ports will ride as devices */
- qbus_create_inplace(&vser->bus.qbus, TYPE_VIRTIO_SERIAL_BUS, qdev,
- vdev->bus_name);
+ qbus_create_inplace(&vser->bus, sizeof(vser->bus), TYPE_VIRTIO_SERIAL_BUS,
+ qdev, vdev->bus_name);
vser->bus.qbus.allow_hotplug = 1;
vser->bus.vser = vser;
QTAILQ_INIT(&vser->ports);