[PATCH 01/11] iio: ad_sigma_delta: replace deprecated iio_push_to_buffers_with_timestamp()

From: Atharv Dubey

Date: Mon Mar 16 2026 - 13:33:53 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/ad_sigma_delta.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index 7852884703b0..73f3069da987 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -636,7 +636,7 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
* once, there is no need for sample number tracking.
*/
if (sigma_delta->active_slots == 1) {
- iio_push_to_buffers_with_timestamp(indio_dev, data, pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, data, sizeof(data), pf->timestamp);
goto irq_handled;
}

@@ -662,8 +662,8 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)

if (sigma_delta->current_slot == sigma_delta->active_slots) {
sigma_delta->current_slot = 0;
- iio_push_to_buffers_with_timestamp(indio_dev, sigma_delta->samples_buf,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, sigma_delta->samples_buf,
+ sizeof(sigma_delta->sampkes_buf), pf->timestamp);
}

irq_handled:
--
2.43.0