aboutsummaryrefslogtreecommitdiff
path: root/hw/esp.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-16 22:25:28 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:46 -0500
commitca9c39faed928405574d234b4f7c5704cd2c568e (patch)
treebd18085c51f1741e18950480fdbccae0c4f85d8f /hw/esp.c
parentcd739fb6e93c32154c898c822c967877894b1ab3 (diff)
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/esp.c')
-rw-r--r--hw/esp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/esp.c b/hw/esp.c
index 9a5a8fbf75..5d86020410 100644
--- a/hw/esp.c
+++ b/hw/esp.c
@@ -63,7 +63,7 @@ struct ESPState {
uint8_t ti_buf[TI_BUFSZ];
uint32_t sense;
uint32_t dma;
- SCSIBus *bus;
+ SCSIBus bus;
SCSIDevice *current_dev;
uint8_t cmdbuf[TI_BUFSZ];
uint32_t cmdlen;
@@ -191,7 +191,7 @@ static uint32_t get_cmd(ESPState *s, uint8_t *buf)
s->async_len = 0;
}
- if (target >= ESP_MAX_DEVS || !s->bus->devs[target]) {
+ if (target >= ESP_MAX_DEVS || !s->bus.devs[target]) {
// No such drive
s->rregs[ESP_RSTAT] = 0;
s->rregs[ESP_RINTR] = INTR_DC;
@@ -199,7 +199,7 @@ static uint32_t get_cmd(ESPState *s, uint8_t *buf)
esp_raise_irq(s);
return 0;
}
- s->current_dev = s->bus->devs[target];
+ s->current_dev = s->bus.devs[target];
return dmalen;
}
@@ -672,8 +672,8 @@ static int esp_init1(SysBusDevice *dev)
qdev_init_gpio_in(&dev->qdev, parent_esp_reset, 1);
- s->bus = scsi_bus_new(&dev->qdev, 0, ESP_MAX_DEVS, esp_command_complete);
- scsi_bus_legacy_handle_cmdline(s->bus);
+ scsi_bus_new(&s->bus, &dev->qdev, 0, ESP_MAX_DEVS, esp_command_complete);
+ scsi_bus_legacy_handle_cmdline(&s->bus);
return 0;
}