44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
From b71219b5f80b646ca9655799d33bdcccf67daa66 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Berg <bberg@redhat.com>
|
|
Date: Wed, 4 Dec 2019 17:14:35 +0100
|
|
Subject: [PATCH 088/181] uru4000: Fix state change from IRQ handler
|
|
|
|
The IRQ handler will re-register itself automatically. However, if this
|
|
happens after the callback is called, then the check whether the IRQ
|
|
handler is running fails.
|
|
|
|
Re-start the IRQ handler before calling the callback. This way the state
|
|
changes happening from the callback will see the correct IRQ handler
|
|
registration state.
|
|
|
|
See: #205
|
|
---
|
|
libfprint/drivers/uru4000.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/libfprint/drivers/uru4000.c b/libfprint/drivers/uru4000.c
|
|
index 122544d..4385f29 100644
|
|
--- a/libfprint/drivers/uru4000.c
|
|
+++ b/libfprint/drivers/uru4000.c
|
|
@@ -332,6 +332,8 @@ irq_handler (FpiUsbTransfer *transfer,
|
|
return;
|
|
}
|
|
|
|
+ start_irq_handler (imgdev);
|
|
+
|
|
type = GUINT16_FROM_BE (*((uint16_t *) data));
|
|
fp_dbg ("recv irq type %04x", type);
|
|
|
|
@@ -344,8 +346,6 @@ irq_handler (FpiUsbTransfer *transfer,
|
|
urudev->irq_cb (imgdev, NULL, type, urudev->irq_cb_data);
|
|
else
|
|
fp_dbg ("ignoring interrupt");
|
|
-
|
|
- start_irq_handler (imgdev);
|
|
}
|
|
|
|
static void
|
|
--
|
|
2.24.1
|
|
|