mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
q35: Use type-safe cast instead of direct access of parent dev
And remove variables if possible. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> [AF: Converted remaining access and renamed to parent_obj] Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
a3560fbf01
commit
ce88812f57
3 changed files with 33 additions and 24 deletions
|
@ -60,6 +60,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
|
|||
const char *boot_device = args->boot_device;
|
||||
ram_addr_t below_4g_mem_size, above_4g_mem_size;
|
||||
Q35PCIHost *q35_host;
|
||||
PCIHostState *phb;
|
||||
PCIBus *host_bus;
|
||||
PCIDevice *lpc;
|
||||
BusState *idebus[MAX_SATA_PORTS];
|
||||
|
@ -139,7 +140,8 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
|
|||
q35_host->mch.guest_info = guest_info;
|
||||
/* pci */
|
||||
qdev_init_nofail(DEVICE(q35_host));
|
||||
host_bus = q35_host->host.pci.bus;
|
||||
phb = PCI_HOST_BRIDGE(q35_host);
|
||||
host_bus = phb->bus;
|
||||
/* create ISA bus */
|
||||
lpc = pci_create_simple_multifunction(host_bus, PCI_DEVFN(ICH9_LPC_DEV,
|
||||
ICH9_LPC_FUNC), true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue