mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -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
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue