mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
switch scsi 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
cd739fb6e9
commit
ca9c39faed
5 changed files with 19 additions and 22 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue