From d276c3489ea16a074d328630729b9b27abee77f1 Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Tue, 2 Jun 2020 23:41:14 +0200 Subject: [PATCH] upeksonly: Fix register write value The value was set after the transfer was submitting, causing the value to always be zero. --- libfprint/drivers/upeksonly.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libfprint/drivers/upeksonly.c b/libfprint/drivers/upeksonly.c index 0488e58..bc6e610 100644 --- a/libfprint/drivers/upeksonly.c +++ b/libfprint/drivers/upeksonly.c @@ -627,9 +627,9 @@ write_regs_iterate (struct write_regs_data *wrdata) 1); transfer->short_is_error = TRUE; transfer->ssm = wrdata->ssm; - fpi_usb_transfer_submit (transfer, CTRL_TIMEOUT, NULL, write_regs_cb, wrdata); - transfer->buffer[0] = regwrite->value; + + fpi_usb_transfer_submit (transfer, CTRL_TIMEOUT, NULL, write_regs_cb, wrdata); } static void @@ -668,10 +668,10 @@ sm_write_reg (FpiSsm *ssm, 1); transfer->short_is_error = TRUE; transfer->ssm = ssm; + transfer->buffer[0] = value; + fpi_usb_transfer_submit (transfer, CTRL_TIMEOUT, NULL, fpi_ssm_usb_transfer_cb, NULL); - - transfer->buffer[0] = value; } static void