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

From: Atharv Dubey

Date: Mon Mar 16 2026 - 13:36:29 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/hx711.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/hx711.c b/drivers/iio/adc/hx711.c
index 1db8b68a8f64..e3f415b5e2a2 100644
--- a/drivers/iio/adc/hx711.c
+++ b/drivers/iio/adc/hx711.c
@@ -372,8 +372,9 @@ static irqreturn_t hx711_trigger(int irq, void *p)
j++;
}

- iio_push_to_buffers_with_timestamp(indio_dev, &hx711_data->buffer,
- pf->timestamp);
+ iio_push_to_buffers_with_ts(indio_dev, &hx711_data->buffer,
+ sizeof(hx711->buffer),
+ pf->timestamp);

mutex_unlock(&hx711_data->lock);

--
2.43.0