diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-10-24 19:44:37 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-10-24 19:44:37 +0000 |
commit | 78971d57bb7395101d11cf72171ae35fdbbbe382 (patch) | |
tree | 39bdfaf06fa6fe0abab8c9ab84db788f8e6013d6 | |
parent | 1a522e8a671f460019675075d68d8e4d6373b4c2 (diff) |
sparc32: convert interrupt controller to reset + vmsd
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | hw/slavio_intctl.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/slavio_intctl.c b/hw/slavio_intctl.c index ab29ee2943..9680392c6b 100644 --- a/hw/slavio_intctl.c +++ b/hw/slavio_intctl.c @@ -409,9 +409,9 @@ static const VMStateDescription vmstate_intctl = { } }; -static void slavio_intctl_reset(void *opaque) +static void slavio_intctl_reset(DeviceState *d) { - SLAVIO_INTCTLState *s = opaque; + SLAVIO_INTCTLState *s = container_of(d, SLAVIO_INTCTLState, busdev.qdev); int i; for (i = 0; i < MAX_CPUS; i++) { @@ -446,9 +446,9 @@ static int slavio_intctl_init1(SysBusDevice *dev) s->slaves[i].cpu = i; s->slaves[i].master = s; } - vmstate_register(-1, &vmstate_intctl, s); - qemu_register_reset(slavio_intctl_reset, s); - slavio_intctl_reset(s); + + slavio_intctl_reset(&s->busdev.qdev); + return 0; } @@ -456,6 +456,8 @@ static SysBusDeviceInfo slavio_intctl_info = { .init = slavio_intctl_init1, .qdev.name = "slavio_intctl", .qdev.size = sizeof(SLAVIO_INTCTLState), + .qdev.vmsd = &vmstate_intctl, + .qdev.reset = slavio_intctl_reset, }; static void slavio_intctl_register_devices(void) |