All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/2] iio: tmp006: Check channel info on write
Date: Sun, 05 Jul 2015 14:24:39 +0100	[thread overview]
Message-ID: <55993017.9090003@kernel.org> (raw)
In-Reply-To: <1434923422-17609-1-git-send-email-pmeerw@pmeerw.net>

On 21/06/15 22:50, Peter Meerwald wrote:
> only SAMP_FREQ is writable
> 
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Applied to the fixes-for-4.2 branch of iio.git

Thanks,

Jonathan
> ---
>  drivers/iio/temperature/tmp006.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/iio/temperature/tmp006.c b/drivers/iio/temperature/tmp006.c
> index 84a0789..7a80509 100644
> --- a/drivers/iio/temperature/tmp006.c
> +++ b/drivers/iio/temperature/tmp006.c
> @@ -132,6 +132,9 @@ static int tmp006_write_raw(struct iio_dev *indio_dev,
>  	struct tmp006_data *data = iio_priv(indio_dev);
>  	int i;
>  
> +	if (mask != IIO_CHAN_INFO_SAMP_FREQ)
> +		return -EINVAL;
> +
>  	for (i = 0; i < ARRAY_SIZE(tmp006_freqs); i++)
>  		if ((val == tmp006_freqs[i][0]) &&
>  		    (val2 == tmp006_freqs[i][1])) {
> 


      parent reply	other threads:[~2015-07-05 13:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-21 21:50 [PATCH 1/2] iio: tmp006: Check channel info on write Peter Meerwald
2015-06-21 21:50 ` [PATCH 2/2] iio: tmp006: Use GENMASK Peter Meerwald
2015-07-05 13:26   ` Jonathan Cameron
2015-07-05 13:24 ` 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=55993017.9090003@kernel.org \
    --to=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.