diff options
author | Gregor Boirie <gregor.boirie@parrot.com> | 2016-08-24 15:28:27 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-08-29 18:06:21 +0100 |
commit | f8e81d7e496ea89f377c6935b92022032bed62e5 (patch) | |
tree | b22366b141f40b8fa9175f7e88b8008c0cf26ed9 /tools/iio | |
parent | eafe5cfe718926c1ed8b3dacd2191c189b3cdcd2 (diff) | |
download | linux-rpi3-f8e81d7e496ea89f377c6935b92022032bed62e5.tar.gz linux-rpi3-f8e81d7e496ea89f377c6935b92022032bed62e5.tar.bz2 linux-rpi3-f8e81d7e496ea89f377c6935b92022032bed62e5.zip |
tools:iio:iio_generic_buffer: fix trigger-less mode
Passing the trigger-less mode option on the command line causes
iio_generic_buffer to fail searching for an IIO trigger.
Fix this by skipping trigger initialization if trigger-less mode is
requested.
Technically it actually fixes:
7c7e9dad70 where the bug was introduced but as the window to the patch
below that changes the context was very small let's mark it with that.
Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Fixes: deb4d1fdcb5af ("iio: generic_buffer: Fix --trigger-num option")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio')
-rw-r--r-- | tools/iio/iio_generic_buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c index ae68bf0e2d51..f39c0e9c0d5c 100644 --- a/tools/iio/iio_generic_buffer.c +++ b/tools/iio/iio_generic_buffer.c @@ -456,7 +456,7 @@ int main(int argc, char **argv) if (notrigger) { printf("trigger-less mode selected\n"); - } if (trig_num >= 0) { + } else if (trig_num >= 0) { char *trig_dev_name; ret = asprintf(&trig_dev_name, "%strigger%d", iio_dir, trig_num); if (ret < 0) { |