diff options
author | Ge Gao <ggao@invensense.com> | 2013-03-04 23:27:00 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-03-17 20:14:37 +0000 |
commit | 6c23811ecb24e077081d04c7af511d94746419ab (patch) | |
tree | 52f4fdb4f950c329d6b968d8e1ef5d5c68f7352f /drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | |
parent | 039a9dce0d192196d40bd35d4bfebfbcade5d14e (diff) | |
download | kernel_goldelico_gta04-6c23811ecb24e077081d04c7af511d94746419ab.zip kernel_goldelico_gta04-6c23811ecb24e077081d04c7af511d94746419ab.tar.gz kernel_goldelico_gta04-6c23811ecb24e077081d04c7af511d94746419ab.tar.bz2 |
using kfifo_in_spinlocked instead of separate code.
Signed-off-by: Ge Gao <ggao@invensense.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c')
-rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c index 331781f..7da0832 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; } |