aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/iio/adc/max1363.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2025-04-13 11:34:32 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-05-21 14:20:26 +0100
commitc65d3f3f938600345146df9f5cac7681c9f1b15e (patch)
tree236e000b356fce8f36bee5301478840a7d2e0e88 /drivers/iio/adc/max1363.c
parentiio: adc: ti-ads131e08: Use new iio_push_to_buffers_with_ts() to provide length sanity check. (diff)
downloadwireguard-linux-c65d3f3f938600345146df9f5cac7681c9f1b15e.tar.xz
wireguard-linux-c65d3f3f938600345146df9f5cac7681c9f1b15e.zip
iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks.
This new function allows us to perform debug checks in the helper to ensure that the overrun does not occur. Use it in all the simple cases where either a static buffer or a structure is used in the drivers. Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250413103443.2420727-10-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/max1363.c')
-rw-r--r--drivers/iio/adc/max1363.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
index d0546c681625..a7e9912fb44a 100644
--- a/drivers/iio/adc/max1363.c
+++ b/drivers/iio/adc/max1363.c
@@ -1498,8 +1498,8 @@ static irqreturn_t max1363_trigger_handler(int irq, void *p)
if (b_sent < 0)
goto done;
- iio_push_to_buffers_with_timestamp(indio_dev, &st->data,
- iio_get_time_ns(indio_dev));
+ iio_push_to_buffers_with_ts(indio_dev, &st->data, sizeof(st->data),
+ iio_get_time_ns(indio_dev));
done:
iio_trigger_notify_done(indio_dev->trig);