Commit 2861e207 authored by Ryan Lim's avatar Ryan Lim Committed by Greg Kroah-Hartman

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: default avatarRyan Lim <limryan@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 93a73889
......@@ -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++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment