All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] using kfifo_in_spinlocked instead of separate code.
@ 2013-03-04 23:27 Ge GAO
  2013-03-17 20:15 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Ge GAO @ 2013-03-04 23:27 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio; +Cc: Ge Gao

From: Ge Gao <ggao@invensense.com>

---
 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, &timestamp, 1);
-	spin_unlock(&st->time_stamp_lock);
+	kfifo_in_spinlocked(&st->timestamps, &timestamp, 1,
+				&st->time_stamp_lock);
 
 	return IRQ_WAKE_THREAD;
 }
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-17 22:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 23:27 [PATCH] using kfifo_in_spinlocked instead of separate code Ge GAO
2013-03-17 20:15 ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.