mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: Add fp_dev argument to timeout callback
To cut down on the fpi_ssm_get_user_data() usage again.
This commit is contained in:
@@ -471,11 +471,12 @@ async_load(fpi_ssm *ssm,
|
||||
}
|
||||
|
||||
/* Callback of asynchronous sleep */
|
||||
static void async_sleep_cb(void *data)
|
||||
static void
|
||||
async_sleep_cb(struct fp_dev *dev,
|
||||
void *data)
|
||||
{
|
||||
fpi_ssm *ssm = data;
|
||||
struct fp_img_dev *dev = fpi_ssm_get_user_data(ssm);
|
||||
struct vfs101_dev *vdev = FP_INSTANCE_DATA(FP_DEV(dev));
|
||||
struct vfs101_dev *vdev = FP_INSTANCE_DATA(dev);
|
||||
|
||||
/* Cleanup timeout */
|
||||
vdev->timeout = NULL;
|
||||
@@ -492,7 +493,7 @@ async_sleep(unsigned int msec,
|
||||
struct vfs101_dev *vdev = FP_INSTANCE_DATA(FP_DEV(dev));
|
||||
|
||||
/* Add timeout */
|
||||
vdev->timeout = fpi_timeout_add(msec, async_sleep_cb, ssm);
|
||||
vdev->timeout = fpi_timeout_add(msec, async_sleep_cb, FP_DEV(dev), ssm);
|
||||
|
||||
if (vdev->timeout == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user