aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev-addr.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-02-02 12:51:44 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-02-07 13:52:42 +0100
commit9b170e60adc6dc01564128cf09f96ec923ed6526 (patch)
tree45e9dd8f533a40be7006517f0f5e998f62292ff1 /hw/qdev-addr.c
parent6350b0904615cc0531cc3059ea34db5c009c88aa (diff)
downloadqemu-9b170e60adc6dc01564128cf09f96ec923ed6526.zip
qemu-9b170e60adc6dc01564128cf09f96ec923ed6526.tar.gz
qemu-9b170e60adc6dc01564128cf09f96ec923ed6526.tar.bz2
qdev: access properties via QOM
Do not poke anymore in the struct when accessing qdev properties. Instead, ask the object to set the right value. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/qdev-addr.c')
-rw-r--r--hw/qdev-addr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/qdev-addr.c b/hw/qdev-addr.c
index 5976dcd..8daa733 100644
--- a/hw/qdev-addr.c
+++ b/hw/qdev-addr.c
@@ -71,5 +71,8 @@ PropertyInfo qdev_prop_taddr = {
void qdev_prop_set_taddr(DeviceState *dev, const char *name, target_phys_addr_t value)
{
- qdev_prop_set(dev, name, &value, PROP_TYPE_TADDR);
+ Error *errp = NULL;
+ object_property_set_int(OBJECT(dev), value, name, &errp);
+ assert(!errp);
+
}