From 1a7d9ee6dd4aa44fc7d937bded8d542e0265e57f Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Tue, 11 Feb 2014 16:27:50 -0800 Subject: ssi: Convert legacy SSI_SLAVE -> DEVICE casts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert legacy ->qdev style casts from TYPE_SSI_SLAVE to TYPE_DEVICE. Signed-off-by: Peter Crosthwaite [AF: Introduce local DeviceState variable for transition to QOM realize] Signed-off-by: Andreas Färber --- hw/misc/max111x.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'hw/misc') diff --git a/hw/misc/max111x.c b/hw/misc/max111x.c index d477ecdb29..28dfa0bd06 100644 --- a/hw/misc/max111x.c +++ b/hw/misc/max111x.c @@ -115,11 +115,12 @@ static const VMStateDescription vmstate_max111x = { } }; -static int max111x_init(SSISlave *dev, int inputs) +static int max111x_init(SSISlave *d, int inputs) { - MAX111xState *s = FROM_SSI_SLAVE(MAX111xState, dev); + DeviceState *dev = DEVICE(d); + MAX111xState *s = FROM_SSI_SLAVE(MAX111xState, d); - qdev_init_gpio_out(&dev->qdev, &s->interrupt, 1); + qdev_init_gpio_out(dev, &s->interrupt, 1); s->inputs = inputs; /* TODO: add a user interface for setting these */ @@ -133,7 +134,7 @@ static int max111x_init(SSISlave *dev, int inputs) s->input[7] = 0x80; s->com = 0; - vmstate_register(&dev->qdev, -1, &vmstate_max111x, s); + vmstate_register(dev, -1, &vmstate_max111x, s); return 0; } -- cgit v1.2.3