diff options
author | Hu Tao <hutao@cn.fujitsu.com> | 2013-07-01 18:18:22 +0800 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-07-23 00:37:34 +0200 |
commit | ce88812f576a0d5b172f99b253bcdc1dc37f86f2 (patch) | |
tree | 0d796d0e285510bb220cfd26b314b2a415e354f0 /hw/i386 | |
parent | a3560fbf012e19c5c9b495cc0d90f2dd4491e09f (diff) |
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>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/pc_q35.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 6f10246edf..0b1d2e32f7 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -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, |