diff options
author | Cédric Le Goater <clg@kaod.org> | 2016-07-04 13:06:37 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-07-04 13:15:22 +0100 |
commit | 7673bb4cd305637b37bd0c0b79dd3bf6deb55172 (patch) | |
tree | cdbde26ac2323bac0cf260941d585baad2056897 /hw/display/ssd0323.c | |
parent | f4b99537f1caac9864e3e93ac5a980e5d62ece0f (diff) | |
download | qemu-7673bb4cd305637b37bd0c0b79dd3bf6deb55172.zip qemu-7673bb4cd305637b37bd0c0b79dd3bf6deb55172.tar.gz qemu-7673bb4cd305637b37bd0c0b79dd3bf6deb55172.tar.bz2 |
ssi: change ssi_slave_init to be a realize ops
This enables qemu to handle late inits and report errors. All the SSI
slave routine names were changed accordingly. Code was modified to
handle errors when possible (m25p80 and ssi-sd)
Tested with the m25p80 slave object.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-id: 1467138270-32481-2-git-send-email-clg@kaod.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/display/ssd0323.c')
-rw-r--r-- | hw/display/ssd0323.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/display/ssd0323.c b/hw/display/ssd0323.c index 14c1bf3..6d1faf4 100644 --- a/hw/display/ssd0323.c +++ b/hw/display/ssd0323.c @@ -361,7 +361,7 @@ static const GraphicHwOps ssd0323_ops = { .gfx_update = ssd0323_update_display, }; -static int ssd0323_init(SSISlave *d) +static void ssd0323_realize(SSISlave *d, Error **errp) { DeviceState *dev = DEVICE(d); ssd0323_state *s = FROM_SSI_SLAVE(ssd0323_state, d); @@ -375,14 +375,13 @@ static int ssd0323_init(SSISlave *d) register_savevm(dev, "ssd0323_oled", -1, 1, ssd0323_save, ssd0323_load, s); - return 0; } static void ssd0323_class_init(ObjectClass *klass, void *data) { SSISlaveClass *k = SSI_SLAVE_CLASS(klass); - k->init = ssd0323_init; + k->realize = ssd0323_realize; k->transfer = ssd0323_transfer; k->cs_polarity = SSI_CS_HIGH; } |