From 40ed3536664a142b6d185b15ab3e6576a48963ed Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Fri, 22 May 2020 17:29:00 +0200 Subject: [PATCH] elan: Only queue state changes once The driver would warn about the fact that a state change is queued, but still queue it a second time. This would result in deactivation to run twice. See: #216 --- libfprint/drivers/elan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libfprint/drivers/elan.c b/libfprint/drivers/elan.c index a4985397..f88ec3e9 100644 --- a/libfprint/drivers/elan.c +++ b/libfprint/drivers/elan.c @@ -1015,7 +1015,10 @@ dev_change_state (FpImageDevice *dev, FpiImageDeviceState state) state = FPI_IMAGE_DEVICE_STATE_INACTIVE; if (self->dev_state_next == state) - fp_dbg ("change to state %d already queued", state); + { + fp_dbg ("change to state %d already queued", state); + return; + } switch (state) {