From: Axel Haslam Date: Tue, 8 Mar 2016 09:03:40 +0000 (+0100) Subject: greybus: loopback_test: Use timeout argument X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4b82dd7be3d3ea62c634bda6bd01666912bc7e79;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: loopback_test: Use timeout argument Patch "c3b0a32 Loopback_test: use poll instead of inotify" added a optional argument for the user to specify a timeout value, but did not use this parameter in the actual poll function. The default of 30 seconds is always used. Fix this by actually using the the poll_timeout parameter so the user can run long tests. Signed-off-by: Axel Haslam Reviewed-by: Patrick Titiano Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c index 0abe62390b1b..ab40bcf8ca0a 100644 --- a/drivers/staging/greybus/tools/loopback_test.c +++ b/drivers/staging/greybus/tools/loopback_test.c @@ -714,7 +714,7 @@ static int wait_for_complete(struct loopback_test *t) int i; while (1) { - ret = poll(t->fds, t->poll_count, DEFAULT_POLL_TIMEOUT_SEC * 1000); + ret = poll(t->fds, t->poll_count, t->poll_timeout * 1000); if (ret == 0) { fprintf(stderr, "Poll timmed out!\n"); return -1;