[PATCH v3 2/2] iio: accel: kionix-kx022a: use iio_push_to_buffers_with_ts()
From: Gabriel Rondon
Date: Wed Aug 19 2026 - 06:38:40 EST
Replace the deprecated iio_push_to_buffers_with_timestamp() with
iio_push_to_buffers_with_ts(), which takes and checks the buffer size.
Both sites push data->scan, so pass its size.
Signed-off-by: Gabriel Rondon <grondon@xxxxxxxxx>
Reviewed-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
---
drivers/iio/accel/kionix-kx022a.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
index 93104fdc74b5..06ae7e540ee6 100644
--- a/drivers/iio/accel/kionix-kx022a.c
+++ b/drivers/iio/accel/kionix-kx022a.c
@@ -863,7 +863,8 @@ static int __kx022a_fifo_flush(struct iio_dev *idev, unsigned int samples,
for_each_set_bit(bit, idev->active_scan_mask, AXIS_MAX)
chs[bit] = sam[bit];
- iio_push_to_buffers_with_timestamp(idev, &data->scan, tstamp);
+ iio_push_to_buffers_with_ts(idev, &data->scan,
+ sizeof(data->scan), tstamp);
tstamp += sample_period;
}
@@ -1033,7 +1034,8 @@ static irqreturn_t kx022a_trigger_handler(int irq, void *p)
if (ret < 0)
goto err_read;
- iio_push_to_buffers_with_timestamp(idev, &data->scan, data->timestamp);
+ iio_push_to_buffers_with_ts(idev, &data->scan, sizeof(data->scan),
+ data->timestamp);
err_read:
iio_trigger_notify_done(idev->trig);
--
2.50.1 (Apple Git-155)