aboutsummaryrefslogtreecommitdiff
path: root/hw/display/ads7846.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/ads7846.c')
-rw-r--r--hw/display/ads7846.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c
index 05aa2d1..166edad 100644
--- a/hw/display/ads7846.c
+++ b/hw/display/ads7846.c
@@ -133,7 +133,7 @@ static const VMStateDescription vmstate_ads7846 = {
}
};
-static int ads7846_init(SSISlave *d)
+static void ads7846_realize(SSISlave *d, Error **errp)
{
DeviceState *dev = DEVICE(d);
ADS7846State *s = FROM_SSI_SLAVE(ADS7846State, d);
@@ -152,14 +152,13 @@ static int ads7846_init(SSISlave *d)
ads7846_int_update(s);
vmstate_register(NULL, -1, &vmstate_ads7846, s);
- return 0;
}
static void ads7846_class_init(ObjectClass *klass, void *data)
{
SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
- k->init = ads7846_init;
+ k->realize = ads7846_realize;
k->transfer = ads7846_transfer;
}