aboutsummaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-02-11 16:27:50 -0800
committerAndreas Färber <afaerber@suse.de>2014-03-12 20:13:02 +0100
commit1a7d9ee6dd4aa44fc7d937bded8d542e0265e57f (patch)
tree318a4ef143b6b4c7d13d2ac1b0b12cd9e76e93a6 /hw/display
parenta01aedc8d32e6f5b08a4041b62be3c5fab7a3382 (diff)
downloadqemu-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/display')
-rw-r--r--hw/display/ads7846.c7
-rw-r--r--hw/display/ssd0323.c11
2 files changed, 10 insertions, 8 deletions
diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c
index 5da3dc5..85252a2 100644
--- a/hw/display/ads7846.c
+++ b/hw/display/ads7846.c
@@ -133,11 +133,12 @@ static const VMStateDescription vmstate_ads7846 = {
}
};
-static int ads7846_init(SSISlave *dev)
+static int ads7846_init(SSISlave *d)
{
- ADS7846State *s = FROM_SSI_SLAVE(ADS7846State, dev);
+ DeviceState *dev = DEVICE(d);
+ ADS7846State *s = FROM_SSI_SLAVE(ADS7846State, d);
- qdev_init_gpio_out(&dev->qdev, &s->interrupt, 1);
+ qdev_init_gpio_out(dev, &s->interrupt, 1);
s->input[0] = ADS_TEMP0; /* TEMP0 */
s->input[2] = ADS_VBAT; /* VBAT */
diff --git a/hw/display/ssd0323.c b/hw/display/ssd0323.c
index 46c3b40..971152e 100644
--- a/hw/display/ssd0323.c
+++ b/hw/display/ssd0323.c
@@ -336,18 +336,19 @@ static const GraphicHwOps ssd0323_ops = {
.gfx_update = ssd0323_update_display,
};
-static int ssd0323_init(SSISlave *dev)
+static int ssd0323_init(SSISlave *d)
{
- ssd0323_state *s = FROM_SSI_SLAVE(ssd0323_state, dev);
+ DeviceState *dev = DEVICE(d);
+ ssd0323_state *s = FROM_SSI_SLAVE(ssd0323_state, d);
s->col_end = 63;
s->row_end = 79;
- s->con = graphic_console_init(DEVICE(dev), 0, &ssd0323_ops, s);
+ s->con = graphic_console_init(dev, 0, &ssd0323_ops, s);
qemu_console_resize(s->con, 128 * MAGNIFY, 64 * MAGNIFY);
- qdev_init_gpio_in(&dev->qdev, ssd0323_cd, 1);
+ qdev_init_gpio_in(dev, ssd0323_cd, 1);
- register_savevm(&dev->qdev, "ssd0323_oled", -1, 1,
+ register_savevm(dev, "ssd0323_oled", -1, 1,
ssd0323_save, ssd0323_load, s);
return 0;
}