[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 14/32] mpc8544_guts: Turn qdev initfn into instance_in
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 14/32] mpc8544_guts: Turn qdev initfn into instance_init |
Date: |
Sun, 30 Jun 2013 03:44:51 +0200 |
From: Andreas Färber <address@hidden>
SysBus can deal with NULL SysBusDeviceClass::init since 4ce5dae.
Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/mpc8544_guts.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c
index f623b04..d41f615 100644
--- a/hw/ppc/mpc8544_guts.c
+++ b/hw/ppc/mpc8544_guts.c
@@ -114,29 +114,21 @@ static const MemoryRegionOps mpc8544_guts_ops = {
},
};
-static int mpc8544_guts_initfn(SysBusDevice *dev)
+static void mpc8544_guts_initfn(Object *obj)
{
- GutsState *s = MPC8544_GUTS(dev);
+ SysBusDevice *d = SYS_BUS_DEVICE(obj);
+ GutsState *s = MPC8544_GUTS(obj);
memory_region_init_io(&s->iomem, &mpc8544_guts_ops, s,
"mpc8544.guts", MPC8544_GUTS_MMIO_SIZE);
- sysbus_init_mmio(dev, &s->iomem);
-
- return 0;
-}
-
-static void mpc8544_guts_class_init(ObjectClass *klass, void *data)
-{
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
-
- k->init = mpc8544_guts_initfn;
+ sysbus_init_mmio(d, &s->iomem);
}
static const TypeInfo mpc8544_guts_info = {
.name = TYPE_MPC8544_GUTS,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(GutsState),
- .class_init = mpc8544_guts_class_init,
+ .instance_init = mpc8544_guts_initfn,
};
static void mpc8544_guts_register_types(void)
--
1.8.1.4
- [Qemu-ppc] [PATCH 06/32] KVM: PIC: Only commit irq routing when necessary, (continued)
- [Qemu-ppc] [PATCH 06/32] KVM: PIC: Only commit irq routing when necessary, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 03/32] KVM: MSI: Swap payload to native endianness, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 16/32] ppc: do not register IABR SPR twice for 603e, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 01/32] KVM: Don't assume that mpstate exists with in-kernel PIC always, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 26/32] PPC: Fix GDB read on code area for PPC6xx, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 07/32] PPC: Add non-kvm stub file, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 12/32] mpc8544_guts: Fix MemoryRegion name, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 13/32] mpc8544_guts: QOM'ify, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 29/32] PPC: Newworld: Add uninorth token register, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 09/32] intc/openpic: QOM'ify, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 14/32] mpc8544_guts: Turn qdev initfn into instance_init,
Alexander Graf <=
- [Qemu-ppc] [PATCH 19/32] pseries: Fix compiler warning (conversion of pointer to integral value), Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 05/32] PPC: e500: factor out mpic init code, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 10/32] intc/openpic: Convert to QOM realize, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 22/32] Graphics: Switch to 800x600x32 as default mode, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 23/32] booke_ppc: limit booke timer to max when timeout overflow, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 11/32] intc/openpic_kvm: Fix QOM and build issues, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 30/32] PPC: Newworld: Add second uninorth control register set, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 28/32] PPC: Add clock-frequency export for Mac machines, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 21/32] pseries: Update MAINTAINERS information, Alexander Graf, 2013/06/29
- [Qemu-ppc] [PATCH 04/32] openpic: factor out some common defines into openpic.h, Alexander Graf, 2013/06/29