mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user