libfprint/SOURCES/0092-vfs0051-Use-named-SSMs-for-usb-async-exchanges.patch
2021-09-09 20:12:48 +00:00

62 lines
2.4 KiB
Diff

From 170fca1c03aa1becb5e5dc84fa9c61a3f7cf1a32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Wed, 4 Dec 2019 20:14:49 +0100
Subject: [PATCH 092/181] vfs0051: Use named SSMs for usb async exchanges
---
libfprint/drivers/vfs5011.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/libfprint/drivers/vfs5011.c b/libfprint/drivers/vfs5011.c
index 265495a..4af3207 100644
--- a/libfprint/drivers/vfs5011.c
+++ b/libfprint/drivers/vfs5011.c
@@ -190,11 +190,13 @@ usbexchange_loop (FpiSsm *ssm, FpDevice *_dev)
static void
usb_exchange_async (FpiSsm *ssm,
- struct usbexchange_data *data)
+ struct usbexchange_data *data,
+ const char *exchange_name)
{
- FpiSsm *subsm = fpi_ssm_new (FP_DEVICE (data->device),
- usbexchange_loop,
- data->stepcount);
+ FpiSsm *subsm = fpi_ssm_new_full (FP_DEVICE (data->device),
+ usbexchange_loop,
+ data->stepcount,
+ exchange_name);
fpi_ssm_set_data (subsm, data, NULL);
fpi_ssm_start_subsm (ssm, subsm);
@@ -684,7 +686,7 @@ activate_loop (FpiSsm *ssm, FpDevice *_dev)
self->init_sequence.receive_buf =
g_malloc0 (VFS5011_RECEIVE_BUF_SIZE);
self->init_sequence.timeout = 1000;
- usb_exchange_async (ssm, &self->init_sequence);
+ usb_exchange_async (ssm, &self->init_sequence, "ACTIVATE REQUEST");
break;
case DEV_ACTIVATE_INIT_COMPLETE:
@@ -716,7 +718,7 @@ activate_loop (FpiSsm *ssm, FpDevice *_dev)
self->init_sequence.receive_buf =
g_malloc0 (VFS5011_RECEIVE_BUF_SIZE);
self->init_sequence.timeout = VFS5011_DEFAULT_WAIT_TIMEOUT;
- usb_exchange_async (ssm, &self->init_sequence);
+ usb_exchange_async (ssm, &self->init_sequence, "PREPARE CAPTURE");
break;
}
@@ -769,7 +771,7 @@ open_loop (FpiSsm *ssm, FpDevice *_dev)
self->init_sequence.receive_buf =
g_malloc0 (VFS5011_RECEIVE_BUF_SIZE);
self->init_sequence.timeout = VFS5011_DEFAULT_WAIT_TIMEOUT;
- usb_exchange_async (ssm, &self->init_sequence);
+ usb_exchange_async (ssm, &self->init_sequence, "DEVICE OPEN");
break;
}
;
--
2.24.1