]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/petalogix_s3adsp1800_mmu.c
kill drives_table
[mirror_qemu.git] / hw / petalogix_s3adsp1800_mmu.c
index c2a196f85d06978f77e91ac31c08b065d584c48f..1a1cc0e371d8cc7bd2e04a635043b4b2f71c0f9a 100644 (file)
@@ -106,6 +106,7 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size,
     DeviceState *dev;
     CPUState *env;
     int kernel_size;
+    DriveInfo *dinfo;
     int i;
     target_phys_addr_t ddr_base = 0x90000000;
     ram_addr_t phys_lmb_bram;
@@ -131,9 +132,9 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size,
     cpu_register_physical_memory(ddr_base, ram_size, phys_ram | IO_MEM_RAM);
 
     phys_flash = qemu_ram_alloc(FLASH_SIZE);
-    i = drive_get_index(IF_PFLASH, 0, 0);
+    dinfo = drive_get(IF_PFLASH, 0, 0);
     pflash_cfi02_register(0xa0000000, phys_flash,
-                          i != -1 ? drives_table[i].bdrv : NULL, (64 * 1024),
+                          dinfo ? dinfo->bdrv : NULL, (64 * 1024),
                           FLASH_SIZE >> 16,
                           1, 1, 0x0000, 0x0000, 0x0000, 0x0000,
                           0x555, 0x2aa);