From: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org
Subject: [IIO] Mistake in assumption about trigger names
Date: Fri, 9 Sep 2011 16:01:39 +0200 [thread overview]
Message-ID: <201109091601.39902.manuel.stahl@iis.fraunhofer.de> (raw)
Hi Jonathan,
I'm currently updating the iioutils SF project. By doing so I encountered a
problem in your generic_buffer.c example.
You generate the trigger name from the device name:
> if (trigger_name == NULL) {
> /*
> * Build the trigger name. If it is device associated it's
> * name is <device_name>_dev[n] where n matches the device
> * number found above
> */
> ret = asprintf(&trigger_name,
> "%s-dev%d", device_name, dev_num);
> if (ret < 0) {
> ret = -ENOMEM;
> goto error_ret;
> }
> }
That will not work if a device has no trigger and is enumerated before the
device you are looking at.
I think we need a symlink in the device directory to it's own trigger.
Also the current_trigger attribute should go into the buffer directory, as
this is the place, where it is actually used.
--
Regards,
Manuel Stahl
next reply other threads:[~2011-09-09 14:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 14:01 Manuel Stahl [this message]
2011-09-09 14:40 ` [IIO] Mistake in assumption about trigger names Jonathan Cameron
2011-09-09 14:56 ` [PATCH] staging:iio: move id and device name setting to iio_device_allocate Jonathan Cameron
2011-09-09 14:57 ` Jonathan Cameron
2011-09-12 8:27 ` Manuel Stahl
2011-09-12 8:37 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201109091601.39902.manuel.stahl@iis.fraunhofer.de \
--to=manuel.stahl@iis.fraunhofer.de \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).