提交 6c23811e 编写于 作者: G Ge Gao 提交者: Jonathan Cameron

using kfifo_in_spinlocked instead of separate code.

Signed-off-by: NGe Gao <ggao@invensense.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 039a9dce
......@@ -105,9 +105,8 @@ irqreturn_t inv_mpu6050_irq_handler(int irq, void *p)
s64 timestamp;
timestamp = iio_get_time_ns();
spin_lock(&st->time_stamp_lock);
kfifo_in(&st->timestamps, &timestamp, 1);
spin_unlock(&st->time_stamp_lock);
kfifo_in_spinlocked(&st->timestamps, &timestamp, 1,
&st->time_stamp_lock);
return IRQ_WAKE_THREAD;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册