Revert "lib: Async functions cannot be started without a mainloop"

This reverts commit 700c5791f8.

We don't need a poll setup to be able to call sync functions, which then
use async functions for implementation internally.

Closes: #124

Conflicts:
	libfprint/fpi-async.c
This commit is contained in:
Bastien Nocera 2018-11-09 12:20:40 +01:00
parent e0d2f3ae53
commit 422f81b60c

View file

@ -21,7 +21,6 @@
#include "fp_internal.h" #include "fp_internal.h"
#include "fpi-async.h" #include "fpi-async.h"
#include "fpi-poll.h"
#include <config.h> #include <config.h>
#include <errno.h> #include <errno.h>
@ -178,7 +177,6 @@ API_EXPORTED int fp_async_enroll_start(struct fp_dev *dev,
int r; int r;
g_return_val_if_fail(dev != NULL, -ENODEV); g_return_val_if_fail(dev != NULL, -ENODEV);
g_return_val_if_fail (fpi_poll_is_setup(), -EIO);
g_return_val_if_fail (callback != NULL, -EINVAL); g_return_val_if_fail (callback != NULL, -EINVAL);
drv = dev->drv; drv = dev->drv;
@ -295,7 +293,6 @@ API_EXPORTED int fp_async_verify_start(struct fp_dev *dev,
int r; int r;
g_return_val_if_fail(dev != NULL, -ENODEV); g_return_val_if_fail(dev != NULL, -ENODEV);
g_return_val_if_fail (fpi_poll_is_setup(), -EIO);
g_return_val_if_fail (callback != NULL, -EINVAL); g_return_val_if_fail (callback != NULL, -EINVAL);
drv = dev->drv; drv = dev->drv;
@ -430,7 +427,6 @@ API_EXPORTED int fp_async_identify_start(struct fp_dev *dev,
int r; int r;
g_return_val_if_fail(dev != NULL, -ENODEV); g_return_val_if_fail(dev != NULL, -ENODEV);
g_return_val_if_fail (fpi_poll_is_setup(), -EIO);
g_return_val_if_fail (callback != NULL, -EINVAL); g_return_val_if_fail (callback != NULL, -EINVAL);
drv = dev->drv; drv = dev->drv;
@ -565,7 +561,6 @@ API_EXPORTED int fp_async_capture_start(struct fp_dev *dev, int unconditional,
int r; int r;
g_return_val_if_fail(dev != NULL, -ENODEV); g_return_val_if_fail(dev != NULL, -ENODEV);
g_return_val_if_fail (fpi_poll_is_setup(), -EIO);
g_return_val_if_fail (callback != NULL, -EINVAL); g_return_val_if_fail (callback != NULL, -EINVAL);
drv = dev->drv; drv = dev->drv;