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/sparc64 | |
parent | 417adc2d50937b95e5e89d8939f13d7e85d5ad9d (diff) | |
download | 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/sparc64')
-rw-r--r-- | hw/sparc64/sun4u.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index d33e84f831..6abfcb30f8 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -50,7 +50,6 @@ #include "hw/sparc/sparc64.h" #include "hw/nvram/fw_cfg.h" #include "hw/sysbus.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "hw/loader.h" #include "hw/fw-path-provider.h" @@ -563,7 +562,6 @@ static void sun4uv_init(MemoryRegion *address_space_mem, PCIBus *pci_bus, *pci_busA, *pci_busB; PCIDevice *ebus, *pci_dev; SysBusDevice *s; - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; DeviceState *iommu, *dev; FWCfgState *fw_cfg; NICInfo *nd; @@ -663,12 +661,10 @@ static void sun4uv_init(MemoryRegion *address_space_mem, qemu_macaddr_default_if_unset(&macaddr); } - ide_drive_get(hd, ARRAY_SIZE(hd)); - pci_dev = pci_create(pci_busA, PCI_DEVFN(3, 0), "cmd646-ide"); qdev_prop_set_uint32(&pci_dev->qdev, "secondary", 1); qdev_init_nofail(&pci_dev->qdev); - pci_ide_create_devs(pci_dev, hd); + pci_ide_create_devs(pci_dev); /* Map NVRAM into I/O (ebus) space */ nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59); |