* [PATCH 11/11] iio: adc : ad7944 : replace deprecated iio_push_to_buffers_with_timestamp()
@ 2026-03-16 17:31 Atharv Dubey
0 siblings, 0 replies; only message in thread
From: Atharv Dubey @ 2026-03-16 17:31 UTC (permalink / raw)
To: jic23
Cc: dlechner, nuno.sa, andy, marcelo.schmitt, mazziesaccount,
linux-iio, linux-kernel, Atharv Dubey
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-16 17:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 17:31 [PATCH 11/11] iio: adc : ad7944 : replace deprecated iio_push_to_buffers_with_timestamp() Atharv Dubey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox