diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-09-16 22:25:28 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-05 09:32:46 -0500 |
commit | ca9c39faed928405574d234b4f7c5704cd2c568e (patch) | |
tree | bd18085c51f1741e18950480fdbccae0c4f85d8f /hw/scsi-bus.c | |
parent | cd739fb6e93c32154c898c822c967877894b1ab3 (diff) | |
download | qemu-ca9c39faed928405574d234b4f7c5704cd2c568e.tar.gz qemu-ca9c39faed928405574d234b4f7c5704cd2c568e.tar.bz2 qemu-ca9c39faed928405574d234b4f7c5704cd2c568e.zip |
switch scsi bus to inplace allocation.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r-- | hw/scsi-bus.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 16afa0532a..881e36320a 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -15,17 +15,14 @@ static struct BusInfo scsi_bus_info = { static int next_scsi_bus; /* Create a scsi bus, and attach devices to it. */ -SCSIBus *scsi_bus_new(DeviceState *host, int tcq, int ndev, - scsi_completionfn complete) +void scsi_bus_new(SCSIBus *bus, DeviceState *host, int tcq, int ndev, + scsi_completionfn complete) { - SCSIBus *bus; - - bus = FROM_QBUS(SCSIBus, qbus_create(&scsi_bus_info, host, NULL)); + qbus_create_inplace(&bus->qbus, &scsi_bus_info, host, NULL); bus->busnr = next_scsi_bus++; bus->tcq = tcq; bus->ndev = ndev; bus->complete = complete; - return bus; } static int scsi_qdev_init(DeviceState *qdev, DeviceInfo *base) |