aboutsummaryrefslogtreecommitdiff
path: root/hw/sun4m.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sun4m.c')
-rw-r--r--hw/sun4m.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c
index a869d15a81..01c7cb4a78 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -758,9 +758,8 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
qemu_irq fdc_tc;
qemu_irq *cpu_halt;
unsigned long kernel_size;
- BlockDriverState *fd[MAX_FD];
+ DriveInfo *fd[MAX_FD];
void *fw_cfg;
- DriveInfo *dinfo;
/* init CPUs */
if (!cpu_model)
@@ -834,10 +833,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
if (hwdef->fd_base) {
/* there is zero or one floppy drive */
memset(fd, 0, sizeof(fd));
- dinfo = drive_get(IF_FLOPPY, 0, 0);
- if (dinfo)
- fd[0] = dinfo->bdrv;
-
+ fd[0] = drive_get(IF_FLOPPY, 0, 0);
sun4m_fdctrl_init(slavio_irq[22], hwdef->fd_base, fd,
&fdc_tc);
}
@@ -1562,11 +1558,10 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
qemu_irq esp_reset;
qemu_irq fdc_tc;
unsigned long kernel_size;
- BlockDriverState *fd[MAX_FD];
+ DriveInfo *fd[MAX_FD];
void *fw_cfg;
DeviceState *dev;
unsigned int i;
- DriveInfo *dinfo;
/* init CPU */
if (!cpu_model)
@@ -1618,10 +1613,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
if (hwdef->fd_base != (target_phys_addr_t)-1) {
/* there is zero or one floppy drive */
memset(fd, 0, sizeof(fd));
- dinfo = drive_get(IF_FLOPPY, 0, 0);
- if (dinfo)
- fd[0] = dinfo->bdrv;
-
+ fd[0] = drive_get(IF_FLOPPY, 0, 0);
sun4m_fdctrl_init(slavio_irq[1], hwdef->fd_base, fd,
&fdc_tc);
}