Skip to contentSkip to conversation

iio: adc : mt6360 : replace deprecated iio_push_to_buffers_with_timestamp()

PATCH In review Atharv Dubey 1 participant 1 message Mar 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 10/11 iio: adc : mt6360 : 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.

---
 drivers/iio/adc/mt6360-adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/mt6360-adc.c +1 -1
index e0e4df418612..b123251e3786 100644
@@ -276,7 +276,7 @@ static irqreturn_t mt6360_adc_trigger_handler(int irq, void *p)
 
 		data.values[i++] = val;
 	}
-	iio_push_to_buffers_with_timestamp(indio_dev, &data, iio_get_time_ns(indio_dev));
+	iio_push_to_buffers_with_ts(indio_dev, &data, sizeof(data), iio_get_time_ns(indio_dev));
 out:
 	iio_trigger_notify_done(indio_dev->trig);
 
Signature · 1 line
2.43.0