using kfifo_in_spinlocked instead of separate code.
Signed-off-by: Ge Gao <ggao@invensense.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
039a9dce0d
commit
6c23811ecb
1 changed files with 2 additions and 3 deletions
|
@ -105,9 +105,8 @@ irqreturn_t inv_mpu6050_irq_handler(int irq, void *p)
|
||||||
s64 timestamp;
|
s64 timestamp;
|
||||||
|
|
||||||
timestamp = iio_get_time_ns();
|
timestamp = iio_get_time_ns();
|
||||||
spin_lock(&st->time_stamp_lock);
|
kfifo_in_spinlocked(&st->timestamps, ×tamp, 1,
|
||||||
kfifo_in(&st->timestamps, ×tamp, 1);
|
&st->time_stamp_lock);
|
||||||
spin_unlock(&st->time_stamp_lock);
|
|
||||||
|
|
||||||
return IRQ_WAKE_THREAD;
|
return IRQ_WAKE_THREAD;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue