Blame SOURCES/0088-uru4000-Fix-state-change-from-IRQ-handler.patch

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