aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-04-03 10:05:07 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-18 15:14:37 +0200
commit4b3582b06b6105ac182a051e4f3647da2c99fd66 (patch)
tree3b20ee936fdbe34116652e8dadad95eab985e640 /hw/qdev.c
parentbce544740a87cac1636f01c8a28502fec1694b3d (diff)
downloadqemu-4b3582b06b6105ac182a051e4f3647da2c99fd66.zip
qemu-4b3582b06b6105ac182a051e4f3647da2c99fd66.tar.gz
qemu-4b3582b06b6105ac182a051e4f3647da2c99fd66.tar.bz2
qdev: Clean up global properties
Now that global properties do not depend on buses anymore, set them directly in the device instance_init function. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index f239902..483f2e6 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -111,7 +111,6 @@ DeviceState *qdev_try_create(BusState *bus, const char *type)
}
qdev_set_parent_bus(dev, bus);
- qdev_prop_set_globals(dev);
return dev;
}
@@ -618,6 +617,7 @@ static void device_initfn(Object *obj)
qdev_prop_set_defaults(dev, DEVICE_CLASS(class)->props);
class = object_class_get_parent(class);
} while (class != object_class_by_name(TYPE_DEVICE));
+ qdev_prop_set_globals(dev);
}
/* Unlink device from bus and free the structure. */