mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07: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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user