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

Atharv Dubey posted 11 patches 3 weeks ago
Only 9 patches received!
There is a newer version of this series
[PATCH 03/11] iio: adc : ads7950 : replace deprecated iio_push_to_buffers_with_timestamp()
Posted by Atharv Dubey 3 weeks ago
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/ti-ads7950.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ti-ads7950.c b/drivers/iio/adc/ti-ads7950.c
index bbe1ce577789..a3f01ae5783f 100644
--- a/drivers/iio/adc/ti-ads7950.c
+++ b/drivers/iio/adc/ti-ads7950.c
@@ -313,7 +313,7 @@ static irqreturn_t ti_ads7950_trigger_handler(int irq, void *p)
 	if (ret < 0)
 		goto out;
 
-	iio_push_to_buffers_with_timestamp(indio_dev, &st->rx_buf[2],
+	iio_push_to_buffers_with_ts(indio_dev, &st->rx_buf[2], sizeof(st->rx_buf)
 					   iio_get_time_ns(indio_dev));
 
 out:
-- 
2.43.0