aboutsummaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-05-29 02:26:12 -0700
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2014-06-09 00:33:03 +0200
commita373cdb5cebd58b2e3103e048894ba55910269f6 (patch)
tree400a4f465cefd4a3014915ffc6b2a39677ad5615 /hw/intc
parentaa0f607f618240958974adb39c7957ee54485d90 (diff)
downloadqemu-a373cdb5cebd58b2e3103e048894ba55910269f6.zip
qemu-a373cdb5cebd58b2e3103e048894ba55910269f6.tar.gz
qemu-a373cdb5cebd58b2e3103e048894ba55910269f6.tar.bz2
intc: xilinx_uartlite: Convert SBD::init -> instance_init
SysBusDevice::init is depracated. Convert to Object::init as prescribed by QOM conventions. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/xilinx_intc.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c
index c3682f1..12804ab 100644
--- a/hw/intc/xilinx_intc.c
+++ b/hw/intc/xilinx_intc.c
@@ -161,18 +161,16 @@ static void irq_handler(void *opaque, int irq, int level)
update_irq(p);
}
-static int xilinx_intc_init(SysBusDevice *sbd)
+static void xilinx_intc_init(Object *obj)
{
- DeviceState *dev = DEVICE(sbd);
- struct xlx_pic *p = XILINX_INTC(dev);
+ struct xlx_pic *p = XILINX_INTC(obj);
- qdev_init_gpio_in(dev, irq_handler, 32);
- sysbus_init_irq(sbd, &p->parent_irq);
+ qdev_init_gpio_in(DEVICE(obj), irq_handler, 32);
+ sysbus_init_irq(SYS_BUS_DEVICE(obj), &p->parent_irq);
- memory_region_init_io(&p->mmio, OBJECT(p), &pic_ops, p, "xlnx.xps-intc",
+ memory_region_init_io(&p->mmio, obj, &pic_ops, p, "xlnx.xps-intc",
R_MAX * 4);
- sysbus_init_mmio(sbd, &p->mmio);
- return 0;
+ sysbus_init_mmio(SYS_BUS_DEVICE(obj), &p->mmio);
}
static Property xilinx_intc_properties[] = {
@@ -183,9 +181,7 @@ static Property xilinx_intc_properties[] = {
static void xilinx_intc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
- k->init = xilinx_intc_init;
dc->props = xilinx_intc_properties;
}
@@ -193,6 +189,7 @@ static const TypeInfo xilinx_intc_info = {
.name = TYPE_XILINX_INTC,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(struct xlx_pic),
+ .instance_init = xilinx_intc_init,
.class_init = xilinx_intc_class_init,
};