From: Jonathan Cameron <jic23@kernel.org>
To: Fabien Proriol <Fabien.Proriol@jdsu.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Michal Simek <michal.simek@xilinx.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] 0001-xilinx-xadc-core-Fix-voltage-offset.patch
Date: Thu, 01 Jan 2015 12:50:46 +0000 [thread overview]
Message-ID: <54A542A6.8050605@kernel.org> (raw)
In-Reply-To: <5481D8F1.7040703@jdsu.com>
On 05/12/14 16:12, Fabien Proriol wrote:
> On 22/11/2014 12:44, Jonathan Cameron wrote:
>> Hi
>>
>> This patch appears to be against a relatively ancient kernel.
>> Would you mind rebasing it on linus' current tree?
>>
>> Thanks,
>>
>> Jonathan
>
> Ok, this is the patch rebase on Linus Trovald master
>
>
> From 8833373032c2c4a48569137e0d10804131b98f1d Mon Sep 17 00:00:00 2001
> From: Fabien Proriol <fabien.proriol@jdsu.com>
> Date: Mon, 17 Nov 2014 09:46:02 +0100
> Subject: [PATCH] iio: Fix iio_channel_read return if channel havn't info
>
> iio_channel_read must return an error to avoid offset for channel
> without IIO_CHAN_INFO_OFFSET property
>
> Signed-off-by: Fabien Proriol <fabien.proriol@jdsu.com>
Applied - by hand as something odd happened to this email to the
fixes-togreg branch of iio.git
Thanks,
Jonathan
> ---
> drivers/iio/inkern.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
> index f084610..d33590e 100644
> --- a/drivers/iio/inkern.c
> +++ b/drivers/iio/inkern.c
> @@ -426,6 +426,9 @@ static int iio_channel_read(struct iio_channel *chan, int *val, int *val2,
> if (val2 == NULL)
> val2 = &unused;
>
> + if(!iio_channel_has_info(chan->channel, info))
> + return -EINVAL;
> +
> if (chan->indio_dev->info->read_raw_multi) {
> ret = chan->indio_dev->info->read_raw_multi(chan->indio_dev,
> chan->channel, INDIO_MAX_RAW_ELEMENTS,
>
prev parent reply other threads:[~2015-01-01 12:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 15:33 [PATCH] 0001-xilinx-xadc-core-Fix-voltage-offset.patch Fabien Proriol
2014-11-06 15:44 ` Lars-Peter Clausen
2014-11-06 16:18 ` Fabien Proriol
2014-11-06 16:25 ` Lars-Peter Clausen
2014-11-16 20:29 ` Jonathan Cameron
2014-11-16 20:35 ` Lars-Peter Clausen
[not found] ` <545BA802.5090206@jdsu.com>
[not found] ` <54690AE5.4050900@metafoo.de>
2014-11-17 8:53 ` Fabien Proriol
2014-11-17 8:55 ` Lars-Peter Clausen
2014-11-22 11:44 ` Jonathan Cameron
2014-12-05 16:12 ` Fabien Proriol
2015-01-01 12:50 ` 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=54A542A6.8050605@kernel.org \
--to=jic23@kernel.org \
--cc=Fabien.Proriol@jdsu.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=michal.simek@xilinx.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 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.