diff mbox series

[2/3] hw/misc/mac_via: Replace via2_irq_request() with via_irq_request()

Message ID 20201013204927.3660030-3-f4bug@amsat.org
State New
Headers show
Series hw/misc/mac_via: Factor generic via_irq_request() out | expand

Commit Message

Philippe Mathieu-Daudé Oct. 13, 2020, 8:49 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/misc/mac_via.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)
diff mbox series

Patch

diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c
index 9e64c2521fc..54088b6625a 100644
--- a/hw/misc/mac_via.c
+++ b/hw/misc/mac_via.c
@@ -362,22 +362,6 @@  static void via1_one_second(void *opaque)
     via1_one_second_update(v1s);
 }
 
-static void via2_irq_request(void *opaque, int irq, int level)
-{
-    MOS6522Q800VIA2State *v2s = opaque;
-    MOS6522State *s = MOS6522(v2s);
-    MOS6522DeviceClass *mdc = MOS6522_GET_CLASS(s);
-
-    if (level) {
-        s->ifr |= 1 << irq;
-    } else {
-        s->ifr &= ~(1 << irq);
-    }
-
-    mdc->update_irq(s);
-}
-
-
 static void pram_update(MacVIAState *m)
 {
     if (m->blk) {
@@ -1238,7 +1222,7 @@  static void mos6522_q800_via2_reset(DeviceState *dev)
 
 static void mos6522_q800_via2_init(Object *obj)
 {
-    qdev_init_gpio_in_named(DEVICE(obj), via2_irq_request, "via2-irq",
+    qdev_init_gpio_in_named(DEVICE(obj), via_irq_request, "via2-irq",
                             VIA2_IRQ_NB);
 }