提交 b74fccad 编写于 作者: M Matt Ranostay 提交者: Jonathan Cameron

iio: health: max30100: correct FIFO check condition

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: NMatt Ranostay <mranostay@gmail.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 f7072198
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册