From a1e46de462757e3c900d3d959b4e53a0d2410e49 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Sun, 30 Dec 2018 16:35:33 +0100 Subject: [PATCH] lib: Fix examples not working Remove the sanity check added in commit b1afa9d, having a poll setup isn't necessary to use timeouts, as long as only sync functions are used. Closes: #139 --- libfprint/fpi-poll.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libfprint/fpi-poll.c b/libfprint/fpi-poll.c index af0c4be..0691cc3 100644 --- a/libfprint/fpi-poll.c +++ b/libfprint/fpi-poll.c @@ -91,8 +91,6 @@ struct fpi_timeout { char *name; }; -static gboolean fpi_poll_is_setup(void); - static int timeout_sort_fn(gconstpointer _a, gconstpointer _b) { fpi_timeout *a = (fpi_timeout *) _a; @@ -167,7 +165,6 @@ fpi_timeout *fpi_timeout_add(unsigned int msec, int r; g_return_val_if_fail (dev != NULL, NULL); - g_return_val_if_fail (fpi_poll_is_setup(), NULL); fp_dbg("in %dms", msec); @@ -487,12 +484,6 @@ void fpi_poll_exit(void) libusb_set_pollfd_notifiers(fpi_usb_ctx, NULL, NULL, NULL); } -static gboolean -fpi_poll_is_setup(void) -{ - return (fd_added_cb != NULL && fd_removed_cb != NULL); -} - void fpi_timeout_cancel_all_for_dev(struct fp_dev *dev) {