From 757179038c4884dc43c2ecd0f4da3facb24f262c Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Sun, 3 Apr 2011 20:32:46 +0900 Subject: ide: consolidate drive_get(IF_IDE) factor out ide initialization to call drive_get(IF_IDE) Signed-off-by: Isaku Yamahata Signed-off-by: Kevin Wolf --- hw/ppc_prep.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'hw/ppc_prep.c') diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c index 5615ef9ad8..0e9cfc24cd 100644 --- a/hw/ppc_prep.c +++ b/hw/ppc_prep.c @@ -681,15 +681,7 @@ static void ppc_prep_init (ram_addr_t ram_size, } } - if (drive_get_max_bus(IF_IDE) >= MAX_IDE_BUS) { - fprintf(stderr, "qemu: too many IDE bus\n"); - exit(1); - } - - for(i = 0; i < MAX_IDE_BUS * MAX_IDE_DEVS; i++) { - hd[i] = drive_get(IF_IDE, i / MAX_IDE_DEVS, i % MAX_IDE_DEVS); - } - + ide_drive_get(hd, MAX_IDE_BUS); for(i = 0; i < MAX_IDE_BUS; i++) { isa_ide_init(ide_iobase[i], ide_iobase2[i], ide_irq[i], hd[2 * i], -- cgit v1.2.3