public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: imu: inv_mpu6050: Remove duplicate code between labels
@ 2024-09-01  9:12 Gyeyoung Baek
  2024-09-01 12:08 ` Markus Elfring
  0 siblings, 1 reply; 12+ messages in thread
From: Gyeyoung Baek @ 2024-09-01  9:12 UTC (permalink / raw)
  To: jic23, lars; +Cc: linux-iio, linux-kernel, Gyeyoung Baek

'flush_fifo' label performs same task as 'endsession' label
immediately after calling 'env_reset_fifo' function.
so i remove that duplication.

Signed-off-by: Gyeyoung Baek <gye976@gmail.com>
---
 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
index 45c37525c2f1..40107b4457d4 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
@@ -192,15 +192,12 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p)
 		iio_push_to_buffers_with_timestamp(indio_dev, st->data, timestamp);
 	}
 
-end_session:
-	mutex_unlock(&st->lock);
-	iio_trigger_notify_done(indio_dev->trig);
-
-	return IRQ_HANDLED;
 
 flush_fifo:
 	/* Flush HW and SW FIFOs. */
 	inv_reset_fifo(indio_dev);
+
+end_session:
 	mutex_unlock(&st->lock);
 	iio_trigger_notify_done(indio_dev->trig);
 
-- 
2.34.1


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

end of thread, other threads:[~2024-09-02 11:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-01  9:12 [PATCH] iio: imu: inv_mpu6050: Remove duplicate code between labels Gyeyoung Baek
2024-09-01 12:08 ` Markus Elfring
2024-09-01 13:40   ` gyeyoung
2024-09-02 10:04     ` Jean-Baptiste Maneyrol
2024-09-02 11:15       ` gyeyoung
     [not found]   ` <CAKbEznv-TmCr2FAodrM2SKK5A5pbV9p5-OvXPdmuk_4xXmh=Rw@mail.gmail.com>
2024-09-01 18:16     ` Markus Elfring
2024-09-02  1:59       ` gyeyoung
2024-09-02  6:00         ` Markus Elfring
2024-09-02  1:26           ` gyeyoung
2024-09-02 11:20             ` Markus Elfring
2024-09-02  9:54           ` Jean-Baptiste Maneyrol
2024-09-02 10:36             ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox