diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2014-02-11 16:27:50 -0800 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-03-12 20:13:02 +0100 |
commit | 1a7d9ee6dd4aa44fc7d937bded8d542e0265e57f (patch) | |
tree | 318a4ef143b6b4c7d13d2ac1b0b12cd9e76e93a6 /hw/misc | |
parent | a01aedc8d32e6f5b08a4041b62be3c5fab7a3382 (diff) | |
download | qemu-1a7d9ee6dd4aa44fc7d937bded8d542e0265e57f.zip qemu-1a7d9ee6dd4aa44fc7d937bded8d542e0265e57f.tar.gz qemu-1a7d9ee6dd4aa44fc7d937bded8d542e0265e57f.tar.bz2 |
ssi: Convert legacy SSI_SLAVE -> DEVICE casts
Convert legacy ->qdev style casts from TYPE_SSI_SLAVE to TYPE_DEVICE.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Introduce local DeviceState variable for transition to QOM realize]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/misc')
-rw-r--r-- | hw/misc/max111x.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/misc/max111x.c b/hw/misc/max111x.c index d477ecd..28dfa0b 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; } |