diff options
author | Volker Rümelin <vr_qemu@t-online.de> | 2021-05-25 20:14:32 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-05-26 11:28:14 +0200 |
commit | cec3252416bb76d3c5cee178825a6321950cedec (patch) | |
tree | d863422ef9df931f4b5b82066bfd0ed12b3a5515 /hw/input/ps2.c | |
parent | 7704bb02dd73070b218fb091cdda79679dab2b8f (diff) | |
download | qemu-cec3252416bb76d3c5cee178825a6321950cedec.zip qemu-cec3252416bb76d3c5cee178825a6321950cedec.tar.gz qemu-cec3252416bb76d3c5cee178825a6321950cedec.tar.bz2 |
ps2: don't deassert irq twice if queue is empty
Don't deassert the irq twice if the queue is empty. While the
second deassertion doesn't do any harm, it's unnecessary.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20210525181441.27768-3-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/input/ps2.c')
-rw-r--r-- | hw/input/ps2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 7c7a158..5cf95b4 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -520,7 +520,9 @@ uint32_t ps2_read_data(PS2State *s) /* reading deasserts IRQ */ s->update_irq(s->update_arg, 0); /* reassert IRQs if data left */ - s->update_irq(s->update_arg, q->count != 0); + if (q->count) { + s->update_irq(s->update_arg, 1); + } } return val; } |