[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 08/45] hw/ssi/xilinx_spi: Use DeviceState::realize rath
From: |
Eduardo Habkost |
Subject: |
[Qemu-ppc] [PULL 08/45] hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init |
Date: |
Thu, 18 Oct 2018 17:03:45 -0300 |
From: Philippe Mathieu-Daudé <address@hidden>
Move from the legacy SysBusDevice::init method to using DeviceState::realize.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/ssi/xilinx_spi.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c
index 83585bc8b2..3dae303d5b 100644
--- a/hw/ssi/xilinx_spi.c
+++ b/hw/ssi/xilinx_spi.c
@@ -319,9 +319,9 @@ static const MemoryRegionOps spi_ops = {
}
};
-static int xilinx_spi_init(SysBusDevice *sbd)
+static void xilinx_spi_realize(DeviceState *dev, Error **errp)
{
- DeviceState *dev = DEVICE(sbd);
+ SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
XilinxSPI *s = XILINX_SPI(dev);
int i;
@@ -344,8 +344,6 @@ static int xilinx_spi_init(SysBusDevice *sbd)
fifo8_create(&s->tx_fifo, FIFO_CAPACITY);
fifo8_create(&s->rx_fifo, FIFO_CAPACITY);
-
- return 0;
}
static const VMStateDescription vmstate_xilinx_spi = {
@@ -368,9 +366,8 @@ static Property xilinx_spi_properties[] = {
static void xilinx_spi_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
- k->init = xilinx_spi_init;
+ dc->realize = xilinx_spi_realize;
dc->reset = xlx_spi_reset;
dc->props = xilinx_spi_properties;
dc->vmsd = &vmstate_xilinx_spi;
--
2.18.0.rc1.1.g3f1ff2140
- Re: [Qemu-ppc] [PULL 02/45] vl.c deprecate incorrect CPUs topology, (continued)
- [Qemu-ppc] [PULL 03/45] vl:c: make sure that sockets are calculated correctly in '-smp X' case, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 04/45] numa: Fix QMP command set-numa-node error handling, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 05/45] trace-events: Fix copy/paste typo, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 06/45] hw/timer/sun4v-rtc: Convert from DPRINTF() macro to trace events, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 11/45] hw/mips/gt64xxx_pci: Convert gt64120_reset() function into Device reset method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 08/45] hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init,
Eduardo Habkost <=
- [Qemu-ppc] [PULL 07/45] hw/timer/sun4v-rtc: Use DeviceState::realize rather than SysBusDevice::init, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 10/45] hw/pci-host/bonito: Use DeviceState::realize rather than SysBusDevice::init, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 09/45] hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 12/45] hw/mips/gt64xxx_pci: Mark as bridge device, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 13/45] hw/sparc64/niagara: Model the I/O Bridge with the 'unimplemented_device', Eduardo Habkost, 2018/10/18