Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Michael Hennerich <michael.hennerich@analog.com>,
	linux-iio@vger.kernel.org,
	device-drivers-devel@blackfin.uclinux.org, drivers@analog.com
Subject: Re: [PATCH 1/2] staging:iio: Make write_event_value callback optional
Date: Wed, 26 Oct 2011 13:02:20 +0100	[thread overview]
Message-ID: <4EA7F6CC.6050909@cam.ac.uk> (raw)
In-Reply-To: <1319630467-6924-1-git-send-email-lars@metafoo.de>

On 10/26/11 13:01, Lars-Peter Clausen wrote:
> Some devices have fixed thresholds which can not be modified so make the
> write_event_value callback optional, so the drivers for these devices do not
> have to implement a boilerplate no-op callback.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
> ---
>  drivers/staging/iio/industrialio-core.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
> index cfa4fcb..d2eea07 100644
> --- a/drivers/staging/iio/industrialio-core.c
> +++ b/drivers/staging/iio/industrialio-core.c
> @@ -782,6 +782,9 @@ static ssize_t iio_ev_value_store(struct device *dev,
>  	unsigned long val;
>  	int ret;
>  
> +	if (!indio_dev->info->write_event_value)
> +		return -EINVAL;
> +
>  	ret = strict_strtoul(buf, 10, &val);
>  	if (ret)
>  		return ret;


      parent reply	other threads:[~2011-10-26 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26 12:01 [PATCH 1/2] staging:iio: Make write_event_value callback optional Lars-Peter Clausen
2011-10-26 12:01 ` [PATCH 2/2] staging:iio:dac: Add AD5421 driver Lars-Peter Clausen
2011-10-26 13:21   ` Lars-Peter Clausen
2011-10-26 17:04   ` Jonathan Cameron
2011-10-27  7:25     ` Lars-Peter Clausen
2011-10-26 12:02 ` Jonathan Cameron [this message]

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=4EA7F6CC.6050909@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=drivers@analog.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    /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