mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
qdev: simplify (de)allocation of buses
All conditional deallocation can now be done with object_delete. Remove the @qom_allocated and @glib_allocated fields; replace the latter with a direct assignment of the @free function pointer. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
fde9bf4470
commit
64b625f4b2
4 changed files with 3 additions and 16 deletions
|
@ -106,17 +106,12 @@ typedef struct BusChild {
|
|||
|
||||
/**
|
||||
* BusState:
|
||||
* @qom_allocated: Indicates whether the object was allocated by QOM.
|
||||
* @glib_allocated: Indicates whether the object was initialized in-place
|
||||
* yet is expected to be freed with g_free().
|
||||
*/
|
||||
struct BusState {
|
||||
Object obj;
|
||||
DeviceState *parent;
|
||||
const char *name;
|
||||
int allow_hotplug;
|
||||
bool qom_allocated;
|
||||
bool glib_allocated;
|
||||
int max_index;
|
||||
QTAILQ_HEAD(ChildrenHead, BusChild) children;
|
||||
QLIST_ENTRY(BusState) sibling;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue