summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/tools
diff options
context:
space:
mode:
authorRyan Lim <limryan@google.com>2016-07-20 15:14:02 (GMT)
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-20 18:23:03 (GMT)
commit2861e2079081a156b0b731e1f6acb2aaf5605c5e (patch)
tree0ef17b36b0b2233f02612ac277a33da5f3bf6f7f /drivers/staging/greybus/tools
parent93a738894346d01687c8979bca129d7eaaf7d35f (diff)
downloadlinux-2861e2079081a156b0b731e1f6acb2aaf5605c5e.tar.xz
greybus: loopback_test: Cancel only the tests running on selected devices
When starting a loopback test, it cancels all currently running tests on all loopback devices. When -m argument is given, which runs the test on specific loopback devices, only the tests running on the selected devices need to be cancelled before starting new tests. Signed-off-by: Ryan Lim <limryan@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/tools')
-rw-r--r--drivers/staging/greybus/tools/loopback_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
index 25035f6..ec44892 100644
--- a/drivers/staging/greybus/tools/loopback_test.c
+++ b/drivers/staging/greybus/tools/loopback_test.c
@@ -780,7 +780,8 @@ static void prepare_devices(struct loopback_test *t)
/* Cancel any running tests */
for (i = 0; i < t->device_count; i++)
- write_sysfs_val(t->devices[i].sysfs_entry, "type", 0);
+ if (device_enabled(t, i))
+ write_sysfs_val(t->devices[i].sysfs_entry, "type", 0);
for (i = 0; i < t->device_count; i++) {