]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
greybus: loopback_test: Use timeout argument
authorAxel Haslam <ahaslam@baylibre.com>
Tue, 8 Mar 2016 09:03:40 +0000 (10:03 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 8 Mar 2016 14:22:53 +0000 (06:22 -0800)
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 <ahaslam@baylibre.com>
Reviewed-by: Patrick Titiano <ptitiano@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/tools/loopback_test.c

index 0abe62390b1bac5f7d23fa351f63a24675449b57..ab40bcf8ca0a037f9d215386a6dd1f092e6bdbc5 100644 (file)
@@ -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;