mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
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>
This commit is contained in:
parent
417adc2d50
commit
be1765f398
9 changed files with 18 additions and 35 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue