mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 07:32:29 +02:00
driver,mpu6500: improve readfifo
while (fifo_count == 0) && (kfifo_len(&st->timestamps) > 0) then flush fifo Change-Id: I9b4ab975d708ee1bb02435bca933ce8f3b55e037 Signed-off-by: Zorro Liu <lyx@rock-chips.com>
This commit is contained in:
parent
6e4ff77147
commit
f1a5e64dd8
|
|
@ -1002,7 +1002,7 @@ irqreturn_t inv_read_fifo(int irq, void *dev_id)
|
|||
if (result)
|
||||
goto end_session;
|
||||
fifo_count = be16_to_cpup((__be16 *)(&data[0]));
|
||||
if (fifo_count == 0)
|
||||
if ((fifo_count == 0) && (kfifo_len(&st->timestamps) > 0))
|
||||
goto flush_fifo;
|
||||
if (fifo_count < bytes_per_datum)
|
||||
goto end_session;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user