* [PATCH v1 1/1] tools:iio:iio_generic_buffer: fix trigger-less mode
@ 2016-08-24 13:28 Gregor Boirie
2016-08-29 17:10 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Gregor Boirie @ 2016-08-24 13:28 UTC (permalink / raw)
To: linux-iio
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Gregor Boirie
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.
Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
---
tools/iio/iio_generic_buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c
index ae68bf0..f39c0e9 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) {
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] tools:iio:iio_generic_buffer: fix trigger-less mode
2016-08-24 13:28 [PATCH v1 1/1] tools:iio:iio_generic_buffer: fix trigger-less mode Gregor Boirie
@ 2016-08-29 17:10 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-08-29 17:10 UTC (permalink / raw)
To: Gregor Boirie, linux-iio
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler
On 24/08/16 14:28, Gregor Boirie wrote:
> 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.
>
> Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com>
Applied to the fixes-togreg branch of iio.git
with an appropriate fixes tag.
Thanks,
Jonathan
> ---
> tools/iio/iio_generic_buffer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c
> index ae68bf0..f39c0e9 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) {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-29 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24 13:28 [PATCH v1 1/1] tools:iio:iio_generic_buffer: fix trigger-less mode Gregor Boirie
2016-08-29 17:10 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).