]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/tosa.c
kill drives_table
[mirror_qemu.git] / hw / tosa.c
index b2d66f39d3db5ef3e033d70ec97ceed85d9d127c..b932efc46c4ab5fb9bfc0417b7cea435b8ceaf7d 100644 (file)
--- a/hw/tosa.c
+++ b/hw/tosa.c
 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);