From 1f850f1064cfd30037fd76f688150a437164aaf2 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 16 Sep 2009 22:25:30 +0200 Subject: switch ide bus to inplace allocation. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- hw/ide/qdev.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'hw/ide/qdev.c') 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) -- cgit v1.2.3-55-g7522