aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev-addr.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-01-30 08:55:55 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-03 10:41:08 -0600
commit57c9fafe0f759c9f1efa5451662b3627f9bb95e0 (patch)
tree6a097cdea9a82e94cbd696a45e3e5faac917881b /hw/qdev-addr.c
parent0beb4942071e385c16deba03848898865842edc7 (diff)
qom: move properties from qdev to object
This is mostly code movement although not entirely. This makes properties part of the Object base class which means that we can now start using Object in a meaningful way outside of qdev. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev-addr.c')
-rw-r--r--hw/qdev-addr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/qdev-addr.c b/hw/qdev-addr.c
index 5ddda2d0f4..5976dcdf47 100644
--- a/hw/qdev-addr.c
+++ b/hw/qdev-addr.c
@@ -18,9 +18,10 @@ static int print_taddr(DeviceState *dev, Property *prop, char *dest, size_t len)
return snprintf(dest, len, "0x" TARGET_FMT_plx, *ptr);
}
-static void get_taddr(DeviceState *dev, Visitor *v, void *opaque,
+static void get_taddr(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
+ DeviceState *dev = DEVICE(obj);
Property *prop = opaque;
target_phys_addr_t *ptr = qdev_get_prop_ptr(dev, prop);
int64_t value;
@@ -29,9 +30,10 @@ static void get_taddr(DeviceState *dev, Visitor *v, void *opaque,
visit_type_int(v, &value, name, errp);
}
-static void set_taddr(DeviceState *dev, Visitor *v, void *opaque,
+static void set_taddr(Object *obj, Visitor *v, void *opaque,
const char *name, Error **errp)
{
+ DeviceState *dev = DEVICE(obj);
Property *prop = opaque;
target_phys_addr_t *ptr = qdev_get_prop_ptr(dev, prop);
Error *local_err = NULL;