qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 12/25] qdev: factor setting of global properties


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 12/25] qdev: factor setting of global properties
Date: Tue, 3 Apr 2012 13:15:40 +0200

Now that global properties do not depend on buses anymore, set
them directly in the device instance_init function.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 hw/qdev-monitor.c |    1 -
 hw/qdev.c         |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index 07ac525..3d95940 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -448,7 +448,6 @@ DeviceState *qdev_device_add(QemuOpts *opts)
     /* create device, set properties */
     qdev = DEVICE(object_new(driver));
     qdev_set_parent_bus(qdev, bus);
-    qdev_prop_set_globals(qdev);
 
     id = qemu_opts_id(opts);
     if (id) {
diff --git a/hw/qdev.c b/hw/qdev.c
index d2b0134..adef566 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -129,7 +129,6 @@ DeviceState *qdev_try_create(BusState *bus, const char 
*type)
     }
 
     qdev_set_parent_bus(dev, bus);
-    qdev_prop_set_globals(dev);
 
     return dev;
 }
@@ -644,6 +643,7 @@ static void device_initfn(Object *obj)
         qdev_property_add_legacy(dev, prop, NULL);
         qdev_property_add_static(dev, prop, NULL);
     }
+    qdev_prop_set_globals(dev);
 }
 
 /* Unlink device from bus and free the structure.  */
-- 
1.7.9.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]