iio: adc : ad7944 : replace deprecated iio_push_to_buffers_with_timestamp()
PATCH 11/11 iio: adc : ad7944 : replace deprecated iio_push_to_buffers_with_timestamp()
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 <[email protected]>
--- drivers/iio/adc/ad7944.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/iio/adc/ad7944.c +6 -4
@@ -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);
Signature · 1 line
2.43.0