diff options
author | Ryan Lim <limryan@google.com> | 2016-07-20 08:14:02 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-07-20 11:23:03 -0700 |
commit | 2861e2079081a156b0b731e1f6acb2aaf5605c5e (patch) | |
tree | 0ef17b36b0b2233f02612ac277a33da5f3bf6f7f /drivers/staging/greybus/tools | |
parent | 93a738894346d01687c8979bca129d7eaaf7d35f (diff) | |
download | op-kernel-dev-2861e2079081a156b0b731e1f6acb2aaf5605c5e.zip op-kernel-dev-2861e2079081a156b0b731e1f6acb2aaf5605c5e.tar.gz |
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.c | 3 |
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++) { |