diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-10-24 15:27:23 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-10-24 15:27:23 +0000 |
commit | 1795057a8fcbf5052ffedde230b10f2d8d9722e2 (patch) | |
tree | aa3e8e1b58e2727a66dc44bdb31aa53af902246f /hw/slavio_misc.c | |
parent | 0284dc541042dc7c056cf01c60dbb6d995f5d4f8 (diff) |
sparc32: convert slavio_misc to reset + vmsd
Also remove unused include directive.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/slavio_misc.c')
-rw-r--r-- | hw/slavio_misc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/slavio_misc.c b/hw/slavio_misc.c index ca95b10581..f5216b38f3 100644 --- a/hw/slavio_misc.c +++ b/hw/slavio_misc.c @@ -22,7 +22,6 @@ * THE SOFTWARE. */ -#include "sun4m.h" #include "sysemu.h" #include "sysbus.h" @@ -88,9 +87,9 @@ static void slavio_misc_update_irq(void *opaque) } } -static void slavio_misc_reset(void *opaque) +static void slavio_misc_reset(DeviceState *d) { - MiscState *s = opaque; + MiscState *s = container_of(d, MiscState, busdev.qdev); // Diagnostic and system control registers not cleared in reset s->config = s->aux1 = s->aux2 = s->mctrl = 0; @@ -477,9 +476,8 @@ static int slavio_misc_init1(SysBusDevice *dev) qdev_init_gpio_in(&dev->qdev, slavio_set_power_fail, 1); - vmstate_register(-1, &vmstate_misc, s); - qemu_register_reset(slavio_misc_reset, s); - slavio_misc_reset(s); + slavio_misc_reset(&s->busdev.qdev); + return 0; } @@ -487,6 +485,8 @@ static SysBusDeviceInfo slavio_misc_info = { .init = slavio_misc_init1, .qdev.name = "slavio_misc", .qdev.size = sizeof(MiscState), + .qdev.vmsd = &vmstate_misc, + .qdev.reset = slavio_misc_reset, }; static SysBusDeviceInfo apc_info = { |