Skip to content

Commit

Permalink
hw/input/ps2: Use ps2_raise_irq() instead of open coding it
Browse files Browse the repository at this point in the history
Inspired-by: Volker Rümelin <vr_qemu@t-online.de>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20210513171244.3940519-1-f4bug@amsat.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
philmd authored and kraxel committed May 26, 2021
1 parent 9d74e6c commit 96376ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hw/input/ps2.c
Expand Up @@ -217,7 +217,7 @@ void ps2_queue(PS2State *s, int b)
}

ps2_queue_noirq(s, b);
s->update_irq(s->update_arg, 1);
ps2_raise_irq(s);
}

void ps2_queue_2(PS2State *s, int b1, int b2)
Expand All @@ -228,7 +228,7 @@ void ps2_queue_2(PS2State *s, int b1, int b2)

ps2_queue_noirq(s, b1);
ps2_queue_noirq(s, b2);
s->update_irq(s->update_arg, 1);
ps2_raise_irq(s);
}

void ps2_queue_3(PS2State *s, int b1, int b2, int b3)
Expand All @@ -240,7 +240,7 @@ void ps2_queue_3(PS2State *s, int b1, int b2, int b3)
ps2_queue_noirq(s, b1);
ps2_queue_noirq(s, b2);
ps2_queue_noirq(s, b3);
s->update_irq(s->update_arg, 1);
ps2_raise_irq(s);
}

void ps2_queue_4(PS2State *s, int b1, int b2, int b3, int b4)
Expand All @@ -253,7 +253,7 @@ void ps2_queue_4(PS2State *s, int b1, int b2, int b3, int b4)
ps2_queue_noirq(s, b2);
ps2_queue_noirq(s, b3);
ps2_queue_noirq(s, b4);
s->update_irq(s->update_arg, 1);
ps2_raise_irq(s);
}

/* keycode is the untranslated scancode in the current scancode set. */
Expand Down

0 comments on commit 96376ab

Please sign in to comment.