[PATCH 11/11] iio: adc : ad7944 : replace deprecated iio_push_to_buffers_with_timestamp()

From: Atharv Dubey

Date: Mon Mar 16 2026 - 13:37:11 EST


iio_push_to_buffers_with_timestamp() is deprecated. Replace it with
iio_push_to_buffers_with_ts(), which takes the buffer size as an
argument and helps avoid potential buffer overflows.

Signed-off-by: Atharv Dubey <atharvd440@xxxxxxxxx>
---
drivers/iio/adc/ad7944.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/adc/ad7944.c b/drivers/iio/adc/ad7944.c
index 7722cf9e8214..479ab882edc9 100644
--- a/drivers/iio/adc/ad7944.c
+++ b/drivers/iio/adc/ad7944.c
@@ -532,11 +532,13 @@ static irqreturn_t ad7944_trigger_handler(int irq, void *p)
goto out;

if (adc->spi_mode == AD7944_SPI_MODE_CHAIN)
- iio_push_to_buffers_with_timestamp(indio_dev, adc->chain_mode_buf,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, adc->chain_mode_buf,
+ sizeof(adc->chain_mode_buf),
+ pf->timestamp);
else
- iio_push_to_buffers_with_timestamp(indio_dev, &adc->sample.raw,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, &adc->sample.raw,
+ sizeof(adc->sample.raw),
+ pf->timestamp);

out:
iio_trigger_notify_done(indio_dev->trig);
--
2.43.0