aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2010-05-15 13:32:43 +0200
committerBlue Swirl <blauwirbel@gmail.com>2010-05-15 14:34:41 +0000
commitdc6839100ee42544bffec26bc6a58187c90eeb44 (patch)
treeec05e808eeeee773269e380124dbf6b3aa61f826 /hw
parenta64405d1b5d4badbdf4575ba9bfe2b686145b1c9 (diff)
downloadqemu-dc6839100ee42544bffec26bc6a58187c90eeb44.zip
qemu-dc6839100ee42544bffec26bc6a58187c90eeb44.tar.gz
qemu-dc6839100ee42544bffec26bc6a58187c90eeb44.tar.bz2
mc146818rtc: Register vmstate via qdev
After defining the required alias ID, we can push vmstate registration of mc146818rtc to qdev. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/mc146818rtc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index 89a423e..905e670 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -609,7 +609,7 @@ static int rtc_initfn(ISADevice *dev)
register_ioport_write(base, 2, 1, cmos_ioport_write, s);
register_ioport_read(base, 2, 1, cmos_ioport_read, s);
- vmstate_register(base, &vmstate_rtc, s);
+ qdev_set_legacy_instance_id(&dev->qdev, base, 2);
qemu_register_reset(rtc_reset, s);
return 0;
}
@@ -628,6 +628,7 @@ static ISADeviceInfo mc146818rtc_info = {
.qdev.name = "mc146818rtc",
.qdev.size = sizeof(RTCState),
.qdev.no_user = 1,
+ .qdev.vmsd = &vmstate_rtc,
.init = rtc_initfn,
.qdev.props = (Property[]) {
DEFINE_PROP_INT32("base_year", RTCState, base_year, 1980),