aboutsummaryrefslogtreecommitdiff
path: root/hw/input
diff options
context:
space:
mode:
Diffstat (limited to 'hw/input')
-rw-r--r--hw/input/lasips2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c
index 4940519..bd72505 100644
--- a/hw/input/lasips2.c
+++ b/hw/input/lasips2.c
@@ -247,16 +247,15 @@ static void lasips2_port_set_irq(void *opaque, int level)
LASIPS2State *lasips2_initfn(hwaddr base, qemu_irq irq)
{
- LASIPS2State *s;
DeviceState *dev;
dev = qdev_new(TYPE_LASIPS2);
qdev_prop_set_uint64(dev, "base", base);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
- s = LASIPS2(dev);
- s->irq = irq;
- return s;
+ sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq);
+
+ return LASIPS2(dev);
}
static void lasips2_realize(DeviceState *dev, Error **errp)
@@ -285,6 +284,8 @@ static void lasips2_init(Object *obj)
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->kbd.reg);
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mouse.reg);
+
+ sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq);
}
static Property lasips2_properties[] = {