From: Ge Gao Date: Mon, 4 Mar 2013 23:27:00 +0000 (+0000) Subject: using kfifo_in_spinlocked instead of separate code. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6c23811ecb24e077081d04c7af511d94746419ab;p=linux-beck.git using kfifo_in_spinlocked instead of separate code. Signed-off-by: Ge Gao Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c index 331781ffbb15..7da0832f187b 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c @@ -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, ×tamp, 1); - spin_unlock(&st->time_stamp_lock); + kfifo_in_spinlocked(&st->timestamps, ×tamp, 1, + &st->time_stamp_lock); return IRQ_WAKE_THREAD; }