mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
a01aedc8d3
commit
1a7d9ee6dd
6 changed files with 27 additions and 22 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue