From 751c6a17042b5d011013d6963c0505d671cf708e Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 22 Jul 2009 16:42:57 +0200 Subject: kill drives_table First step cleaning up the drives handling. This one does nothing but removing drives_table[], still it became seriously big. drive_get_index() is gone and is replaced by drives_get() which hands out DriveInfo pointers instead of a table index. This needs adaption in *tons* of places all over. The drives are now maintained as linked list. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- hw/etraxfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hw/etraxfs.c') diff --git a/hw/etraxfs.c b/hw/etraxfs.c index c2eca5275e..ab6a3a302f 100644 --- a/hw/etraxfs.c +++ b/hw/etraxfs.c @@ -55,6 +55,7 @@ void bareetraxfs_init (ram_addr_t ram_size, void *etraxfs_dmac; struct etraxfs_dma_client *eth[2] = {NULL, NULL}; int kernel_size; + DriveInfo *dinfo; int i; ram_addr_t phys_ram; ram_addr_t phys_flash; @@ -79,9 +80,9 @@ void bareetraxfs_init (ram_addr_t ram_size, 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(0x0, phys_flash, - i != -1 ? drives_table[i].bdrv : NULL, (64 * 1024), + dinfo ? dinfo->bdrv : NULL, (64 * 1024), FLASH_SIZE >> 16, 1, 2, 0x0000, 0x0000, 0x0000, 0x0000, 0x555, 0x2aa); -- cgit v1.2.1