mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
hw/rtc/mc146818rtc: convert date from object prop to class prop
This is to allow it to be the target of a class alias property. Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260703090814.2993188-6-mark.caveayland@nutanix.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
7a4775d07f
commit
a02e7fa9e6
@@ -920,8 +920,6 @@ static void rtc_realizefn(DeviceState *dev, Error **errp)
|
||||
memory_region_add_subregion(&s->io, 0, &s->coalesced_io);
|
||||
memory_region_add_coalescing(&s->coalesced_io, 0, 1);
|
||||
|
||||
object_property_add_tm(OBJECT(s), "date", rtc_get_date);
|
||||
|
||||
qdev_init_gpio_out(dev, &s->irq, 1);
|
||||
}
|
||||
|
||||
@@ -1020,6 +1018,8 @@ static void rtc_class_initfn(ObjectClass *klass, const void *data)
|
||||
adevc->build_dev_aml = rtc_build_aml;
|
||||
device_class_set_props(dc, mc146818rtc_properties);
|
||||
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
|
||||
|
||||
object_class_property_add_tm(klass, "date", rtc_get_date);
|
||||
}
|
||||
|
||||
static const TypeInfo mc146818rtc_info = {
|
||||
|
||||
Reference in New Issue
Block a user