fpi-usb-transfer: Take ownership of the transfer when submitting it

When a transfer is completed, we automatically unref it since we can't
consider it valid anymore since this point.

Update the drivers not to free the transfer after submitting anymore.
This commit is contained in:
Marco Trevisan (Treviño)
2019-11-26 21:23:42 +01:00
parent a855c0cc79
commit 2642fc6560
20 changed files with 10 additions and 87 deletions

View File

@@ -88,7 +88,6 @@ do_write_regv (FpImageDevice *dev, struct write_regv_data *wdata, int upper_boun
transfer->short_is_error = TRUE;
fpi_usb_transfer_submit (transfer, BULK_TIMEOUT, NULL,
write_regv_trf_complete, wdata);
fpi_usb_transfer_unref (transfer);
}
/* write the next batch of registers to be written, or if there are no more,