iio: health: max30100: fixed parenthesis around FIFO count check

FIFO was being read every sample after the "almost full" state was
reached. This was due to an incorrect placement of the parenthesis
in the while condition check.

Note - the fixes tag is not actually correct, but the fix in this patch
would also be needed for it to function correctly so we'll go with that
one.  Backports should pick up both.

Signed-off-by: Matt Ranostay <[email protected]>
Fixes: b74fccad7 ("iio: health: max30100: correct FIFO check condition")
Cc: [email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
Matt Ranostay 2017-01-16 18:04:18 -08:00 • committed by Jonathan Cameron
commit 828f84ee8f

View file

@ -238,7 +238,7 @@ 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;