From 57c9fafe0f759c9f1efa5451662b3627f9bb95e0 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Mon, 30 Jan 2012 08:55:55 -0600 Subject: 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 --- hw/mc146818rtc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/mc146818rtc.c') diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index cbbf1f06e0..4a43225707 100644 --- a/hw/mc146818rtc.c +++ b/hw/mc146818rtc.c @@ -628,10 +628,10 @@ static void visit_type_int32(Visitor *v, int *value, const char *name, Error **e visit_type_int(v, &val, name, errp); } -static void rtc_get_date(DeviceState *dev, Visitor *v, void *opaque, +static void rtc_get_date(Object *obj, Visitor *v, void *opaque, const char *name, Error **errp) { - ISADevice *isa = ISA_DEVICE(dev); + ISADevice *isa = ISA_DEVICE(obj); RTCState *s = DO_UPCAST(RTCState, dev, isa); visit_start_struct(v, NULL, "struct tm", name, 0, errp); @@ -686,8 +686,8 @@ static int rtc_initfn(ISADevice *dev) qdev_set_legacy_instance_id(&dev->qdev, base, 2); qemu_register_reset(rtc_reset, s); - qdev_property_add(&s->dev.qdev, "date", "struct tm", - rtc_get_date, NULL, NULL, s, NULL); + object_property_add(OBJECT(s), "date", "struct tm", + rtc_get_date, NULL, NULL, s, NULL); return 0; } -- cgit v1.2.3