Patchwork [PULL,05/26] intc/xilinx_intc: Use qemu_set_irq

login
register
mail settings
Submitter Michael Tokarev
Date June 14, 2013, 10:50 a.m.
Message ID <1371207042-17980-6-git-send-email-mjt@msgid.tls.msk.ru>
Download mbox | patch
Permalink /patch/251331/
State New
Headers show

Comments

Michael Tokarev - June 14, 2013, 10:50 a.m.
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Use qemu_set_irq rather than if-elsing qemu_irq_(lower|raise). No
functional change, just reduces verbosity.

Cc: qemu-trivial@nongnu.org

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/intc/xilinx_intc.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Patch

diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c
index b106e72..5df7008 100644
--- a/hw/intc/xilinx_intc.c
+++ b/hw/intc/xilinx_intc.c
@@ -66,11 +66,7 @@  static void update_irq(struct xlx_pic *p)
         i = ~0;
 
     p->regs[R_IVR] = i;
-    if ((p->regs[R_MER] & 1) && p->regs[R_IPR]) {
-        qemu_irq_raise(p->parent_irq);
-    } else {
-        qemu_irq_lower(p->parent_irq);
-    }
+    qemu_set_irq(p->parent_irq, (p->regs[R_MER] & 1) && p->regs[R_IPR]);
 }
 
 static uint64_t