aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/qdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide/qdev.c')
-rw-r--r--hw/ide/qdev.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index d467e3ad22..c562bc61a6 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -29,12 +29,9 @@ static struct BusInfo ide_bus_info = {
.size = sizeof(IDEBus),
};
-IDEBus *ide_bus_new(DeviceState *dev)
+void ide_bus_new(IDEBus *idebus, DeviceState *dev)
{
- IDEBus *idebus;
-
- idebus = FROM_QBUS(IDEBus, qbus_create(&ide_bus_info, dev, NULL));
- return idebus;
+ qbus_create_inplace(&idebus->qbus, &ide_bus_info, dev, NULL);
}
static int ide_qdev_init(DeviceState *qdev, DeviceInfo *base)