diff options
Diffstat (limited to 'hw/tosa.c')
| -rw-r--r-- | hw/tosa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/tosa.c b/hw/tosa.c index b2d66f39d3..b932efc46c 100644 --- a/hw/tosa.c +++ b/hw/tosa.c @@ -49,13 +49,13 @@ static void tosa_microdrive_attach(PXA2xxState *cpu) { PCMCIACardState *md; - int index; BlockDriverState *bs; + DriveInfo *dinfo; - index = drive_get_index(IF_IDE, 0, 0); - if (index == -1) + dinfo = drive_get(IF_IDE, 0, 0); + if (!dinfo) return; - bs = drives_table[index].bdrv; + bs = dinfo->bdrv; if (bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) { md = dscm1xxxx_init(bs); pxa2xx_pcmcia_attach(cpu->pcmcia[0], md); |