[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/37] puv3_pm.c: Convert sysbus init function to rea
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 15/37] puv3_pm.c: Convert sysbus init function to realize function |
Date: |
Thu, 13 Dec 2018 14:54:23 +0000 |
From: Mao Zhongyi <address@hidden>
Use DeviceClass rather than SysBusDeviceClass in
puv3_pm_class_init().
Cc: address@hidden
Signed-off-by: Mao Zhongyi <address@hidden>
Signed-off-by: Zhang Shengju <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
hw/misc/puv3_pm.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/misc/puv3_pm.c b/hw/misc/puv3_pm.c
index 577cebaac78..afe191fbe1f 100644
--- a/hw/misc/puv3_pm.c
+++ b/hw/misc/puv3_pm.c
@@ -119,7 +119,7 @@ static const MemoryRegionOps puv3_pm_ops = {
.endianness = DEVICE_NATIVE_ENDIAN,
};
-static int puv3_pm_init(SysBusDevice *dev)
+static void puv3_pm_realize(DeviceState *dev, Error **errp)
{
PUV3PMState *s = PUV3_PM(dev);
@@ -127,16 +127,14 @@ static int puv3_pm_init(SysBusDevice *dev)
memory_region_init_io(&s->iomem, OBJECT(s), &puv3_pm_ops, s, "puv3_pm",
PUV3_REGS_OFFSET);
- sysbus_init_mmio(dev, &s->iomem);
-
- return 0;
+ sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
}
static void puv3_pm_class_init(ObjectClass *klass, void *data)
{
- SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass);
+ DeviceClass *dc = DEVICE_CLASS(klass);
- sdc->init = puv3_pm_init;
+ dc->realize = puv3_pm_realize;
}
static const TypeInfo puv3_pm_info = {
--
2.19.2
- [Qemu-devel] [PULL 26/37] hw/arm: versal: Use IRQs 111 - 118 for virtio-mmio, (continued)
- [Qemu-devel] [PULL 26/37] hw/arm: versal: Use IRQs 111 - 118 for virtio-mmio, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 25/37] hw/arm: versal: Reduce number of virtio-mmio instances, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 23/37] core/sysbus: remove the SysBusDeviceClass::init path, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 24/37] hw/arm: versal: Remove bogus virtio-mmio creation, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 22/37] xen_backend: remove xen_sysdev_init() function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 19/37] timer/grlib_gptimer: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 20/37] timer/puv3_ost: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 21/37] usb/tusb6010: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 18/37] timer/etraxfs_timer: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 17/37] pci-bridge/dec: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 15/37] puv3_pm.c: Convert sysbus init function to realize function,
Peter Maydell <=
- [Qemu-devel] [PULL 16/37] nvram/ds1225y: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 14/37] milkymist-pfpu: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- Re: [Qemu-devel] [PULL 00/37] target-arm queue, Peter Maydell, 2018/12/14