diff options
| author | BALATON Zoltan <balaton@eik.bme.hu> | 2020-03-17 16:05:37 +0100 |
|---|---|---|
| committer | John Snow <jsnow@redhat.com> | 2020-03-17 12:22:36 -0400 |
| commit | be1765f39884ec0de413f8619685b3481b1dfa5a (patch) | |
| tree | cffee75cd0fc8d112eb89c934ca6cc1a7cdf6d5b /hw/alpha | |
| parent | 417adc2d50937b95e5e89d8939f13d7e85d5ad9d (diff) | |
| download | focaccia-qemu-be1765f39884ec0de413f8619685b3481b1dfa5a.tar.gz focaccia-qemu-be1765f39884ec0de413f8619685b3481b1dfa5a.zip | |
hw/ide: Do ide_drive_get() within pci_ide_create_devs()
The pci_ide_create_devs() function takes a hd_table parameter but all callers just pass what ide_drive_get() returns so we can do it locally simplifying callers and removing hd_table parameter. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: e9713fdded4d212fa68ed03b844e531934226a6f.1584457537.git.balaton@eik.bme.hu Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/alpha')
| -rw-r--r-- | hw/alpha/dp264.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index 27595767e5..f7751b18f6 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c @@ -15,7 +15,6 @@ #include "qemu/error-report.h" #include "sysemu/sysemu.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "hw/timer/i8254.h" #include "hw/isa/superio.h" @@ -58,6 +57,7 @@ static void clipper_init(MachineState *machine) const char *initrd_filename = machine->initrd_filename; AlphaCPU *cpus[4]; PCIBus *pci_bus; + PCIDevice *pci_dev; ISABus *isa_bus; qemu_irq rtc_irq; long size, i; @@ -100,15 +100,8 @@ static void clipper_init(MachineState *machine) isa_create_simple(isa_bus, TYPE_SMC37C669_SUPERIO); /* IDE disk setup. */ - { - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; - PCIDevice *pci_dev; - - ide_drive_get(hd, ARRAY_SIZE(hd)); - - pci_dev = pci_create_simple(pci_bus, -1, "cmd646-ide"); - pci_ide_create_devs(pci_dev, hd); - } + pci_dev = pci_create_simple(pci_bus, -1, "cmd646-ide"); + pci_ide_create_devs(pci_dev); /* Load PALcode. Given that this is not "real" cpu palcode, but one explicitly written for the emulation, we might as |