From ce88812f576a0d5b172f99b253bcdc1dc37f86f2 Mon Sep 17 00:00:00 2001 From: Hu Tao Date: Mon, 1 Jul 2013 18:18:22 +0800 Subject: q35: Use type-safe cast instead of direct access of parent dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And remove variables if possible. Signed-off-by: Hu Tao [AF: Converted remaining access and renamed to parent_obj] Signed-off-by: Andreas Färber --- include/hw/pci-host/q35.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h index b083831..3cb631e 100644 --- a/include/hw/pci-host/q35.h +++ b/include/hw/pci-host/q35.h @@ -43,7 +43,10 @@ OBJECT_CHECK(MCHPCIState, (obj), TYPE_MCH_PCI_DEVICE) typedef struct MCHPCIState { - PCIDevice d; + /*< private >*/ + PCIDevice parent_obj; + /*< public >*/ + MemoryRegion *ram_memory; MemoryRegion *pci_address_space; MemoryRegion *system_memory; @@ -59,7 +62,10 @@ typedef struct MCHPCIState { } MCHPCIState; typedef struct Q35PCIHost { - PCIExpressHost host; + /*< private >*/ + PCIExpressHost parent_obj; + /*< public >*/ + MCHPCIState mch; } Q35PCIHost; -- cgit v1.1