[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/37] display/g364fb: Convert sysbus init function t
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 07/37] display/g364fb: Convert sysbus init function to realize function |
Date: |
Thu, 13 Dec 2018 14:54:15 +0000 |
From: Mao Zhongyi <address@hidden>
Use DeviceClass rather than SysBusDeviceClass in
g364fb_sysbus_class_init().
Cc: address@hidden
Cc: address@hidden
Cc: address@hidden
Cc: address@hidden
Signed-off-by: Mao Zhongyi <address@hidden>
Signed-off-by: Zhang Shengju <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
hw/display/g364fb.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c
index 8ad7e5d8242..3407adf98d2 100644
--- a/hw/display/g364fb.c
+++ b/hw/display/g364fb.c
@@ -489,18 +489,16 @@ typedef struct {
G364State g364;
} G364SysBusState;
-static int g364fb_sysbus_init(SysBusDevice *sbd)
+static void g364fb_sysbus_realize(DeviceState *dev, Error **errp)
{
- DeviceState *dev = DEVICE(sbd);
G364SysBusState *sbs = G364(dev);
G364State *s = &sbs->g364;
+ SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
g364fb_init(dev, s);
sysbus_init_irq(sbd, &s->irq);
sysbus_init_mmio(sbd, &s->mem_ctrl);
sysbus_init_mmio(sbd, &s->mem_vram);
-
- return 0;
}
static void g364fb_sysbus_reset(DeviceState *d)
@@ -518,9 +516,8 @@ static Property g364fb_sysbus_properties[] = {
static void g364fb_sysbus_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
- k->init = g364fb_sysbus_init;
+ dc->realize = g364fb_sysbus_realize;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->desc = "G364 framebuffer";
dc->reset = g364fb_sysbus_reset;
--
2.19.2
- [Qemu-devel] [PULL 00/37] target-arm queue, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 03/37] musicpal: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 05/37] char/grlib_apbuart: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 04/37] block/noenand: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 07/37] display/g364fb: Convert sysbus init function to realize function,
Peter Maydell <=
- [Qemu-devel] [PULL 08/37] dma/puv3_dma: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 01/37] hw: arm: musicpal: drop TYPE_WM8750 in object_property_set_link(), Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 02/37] Allow AArch64 processors to boot from a kernel placed over 4GB, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 06/37] core/empty_slot: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 10/37] milkymist-softusb: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 09/37] gpio/puv3_gpio: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 12/37] intc/puv3_intc: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 13/37] milkymist-hpdmc: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 11/37] input/pl050: Convert sysbus init function to realize function, Peter Maydell, 2018/12/13
- [Qemu-devel] [PULL 32/37] target/arm: Tidy scr_write, Peter Maydell, 2018/12/13