[PATCH] iio: accel: bmc150: use iio_push_to_buffers_with_ts()
From: Yash Suthar
Date: Sun Aug 09 2026 - 07:13:28 EST
Replace deprecated iio_push_to_buffers_with_timestamp() with
iio_push_to_buffers_with_ts() to allow source size runtime checks.
Signed-off-by: Yash Suthar <yashsuthar983@xxxxxxxxx>
---
Follow-up suggested in:
https://lore.kernel.org/linux-iio/261dcaa5-3e9f-4da8-adb9-dae4eb7310f2@xxxxxxxxxxxx/
drivers/iio/accel/bmc150-accel-core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
index dc8a6285cf3d..d904136720d5 100644
--- a/drivers/iio/accel/bmc150-accel-core.c
+++ b/drivers/iio/accel/bmc150-accel-core.c
@@ -1011,8 +1011,8 @@ static int __bmc150_accel_fifo_flush(struct iio_dev *indio_dev,
memcpy(&data->scan.channels[j++], &buffer[i * 3 + bit],
sizeof(data->scan.channels[0]));
- iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
- tstamp);
+ iio_push_to_buffers_with_ts(indio_dev, &data->scan,
+ sizeof(data->scan), tstamp);
tstamp += sample_period;
}
@@ -1196,8 +1196,8 @@ static irqreturn_t bmc150_accel_trigger_handler(int irq, void *p)
if (ret < 0)
goto err_read;
- iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, data->buffer,
+ sizeof(data->buffer), pf->timestamp);
err_read:
iio_trigger_notify_done(indio_dev->trig);
--
2.43.0