Patch "iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iio-accel-kionix-kx022a-get-the-timestamp-from-the-driver-s-private-data-in-the-trigger_handler.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 03fada47311a3e668f73efc9278c4a559e64ee85 Mon Sep 17 00:00:00 2001
From: Mehdi Djait <mehdi.djait.k@xxxxxxxxx>
Date: Sat, 18 Feb 2023 14:51:11 +0100
Subject: iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler

From: Mehdi Djait <mehdi.djait.k@xxxxxxxxx>

commit 03fada47311a3e668f73efc9278c4a559e64ee85 upstream.

The trigger_handler gets called from the IRQ thread handler using
iio_trigger_poll_chained() which will only call the bottom half of the
pollfunc and therefore pf->timestamp will not get set.

Use instead the timestamp from the driver's private data which is always
set in the IRQ handler.

Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer")
Link: https://lore.kernel.org/linux-iio/Y+6QoBLh1k82cJVN@carbian/
Reviewed-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Signed-off-by: Mehdi Djait <mehdi.djait.k@xxxxxxxxx>
Link: https://lore.kernel.org/r/20230218135111.90061-1-mehdi.djait.k@xxxxxxxxx
Cc: <Stable@xxxxxxxxxxxxxxx>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/iio/accel/kionix-kx022a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
index f866859855cd..1c3a72380fb8 100644
--- a/drivers/iio/accel/kionix-kx022a.c
+++ b/drivers/iio/accel/kionix-kx022a.c
@@ -864,7 +864,7 @@ static irqreturn_t kx022a_trigger_handler(int irq, void *p)
 	if (ret < 0)
 		goto err_read;
 
-	iio_push_to_buffers_with_timestamp(idev, data->buffer, pf->timestamp);
+	iio_push_to_buffers_with_timestamp(idev, data->buffer, data->timestamp);
 err_read:
 	iio_trigger_notify_done(idev->trig);
 
-- 
2.40.0



Patches currently in stable-queue which might be from mehdi.djait.k@xxxxxxxxx are

queue-6.2/iio-accel-kionix-kx022a-get-the-timestamp-from-the-driver-s-private-data-in-the-trigger_handler.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux