From: Jonathan Cameron <jic23@kernel.org>
To: Matt Ranostay <mranostay@gmail.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
David Binderman <dcb314@hotmail.com>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Subject: Re: [PATCH] iio: health: max30100: correct FIFO check condition
Date: Mon, 28 Mar 2016 10:10:36 +0100 [thread overview]
Message-ID: <56F8F50C.4060008@kernel.org> (raw)
In-Reply-To: <CAKzfze9pQwB0F2P+76gtn26ULMo4UDSyA9e-g+YTP7J5eF9LeQ@mail.gmail.com>
On 26/03/16 03:42, Matt Ranostay wrote:
> This get lost in the inbox? :)
> Same fix as for APDS9660 issue in the FIFO
>
> On Thu, Mar 17, 2016 at 8:48 PM, Matt Ranostay <mranostay@gmail.com> wrote:
>> Correct issue that the last entry in FIFO was being read twice due
>> to an incorrect decrement of entry count variable before condition
>> check.
>>
>> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Odd - disappeared without trace. Well spotted.
Applied to the fixes-togreg-post-rc1 branch of iio.git
Thanks,
Jonathan
>> ---
>> drivers/iio/health/max30100.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
>> index 09db893..90ab8a2d 100644
>> --- a/drivers/iio/health/max30100.c
>> +++ b/drivers/iio/health/max30100.c
>> @@ -238,12 +238,13 @@ static irqreturn_t max30100_interrupt_handler(int irq, void *private)
>>
>> mutex_lock(&data->lock);
>>
>> - while (cnt-- || (cnt = max30100_fifo_count(data) > 0)) {
>> + while (cnt || (cnt = max30100_fifo_count(data) > 0)) {
>> ret = max30100_read_measurement(data);
>> if (ret)
>> break;
>>
>> iio_push_to_buffers(data->indio_dev, data->buffer);
>> + cnt--;
>> }
>>
>> mutex_unlock(&data->lock);
>> --
>> 2.7.0
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2016-03-28 9:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 3:48 [PATCH] iio: light: apds9960: correct FIFO check condition Matt Ranostay
2016-03-20 10:34 ` Jonathan Cameron
[not found] ` <1458272888-26146-2-git-send-email-mranostay@gmail.com>
2016-03-26 3:42 ` [PATCH] iio: health: max30100: " Matt Ranostay
2016-03-28 9:10 ` 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=56F8F50C.4060008@kernel.org \
--to=jic23@kernel.org \
--cc=dcb314@hotmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=mranostay@gmail.com \
--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 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).