From 2d1168263bcb84c38f3475f2336b30ede4235ae1 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sun, 13 Apr 2025 11:34:30 +0100 Subject: [PATCH] iio: dummy: Switch to iio_push_to_buffers_with_ts() and provide size of storage MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Provide the storage size so that the helper can sanity check that it is large enough for the configured channels. Reviewed-by: Nuno Sá Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-8-jic23@kernel.org Signed-off-by: Jonathan Cameron --- drivers/iio/dummy/iio_simple_dummy_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dummy/iio_simple_dummy_buffer.c b/drivers/iio/dummy/iio_simple_dummy_buffer.c index d0a7343e1b35..e35e0596cbfb 100644 --- a/drivers/iio/dummy/iio_simple_dummy_buffer.c +++ b/drivers/iio/dummy/iio_simple_dummy_buffer.c @@ -83,8 +83,8 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p) iio_for_each_active_channel(indio_dev, j) scan->data[i++] = fakedata[j]; - iio_push_to_buffers_with_timestamp(indio_dev, scan, - iio_get_time_ns(indio_dev)); + iio_push_to_buffers_with_ts(indio_dev, scan, sizeof(*scan), + iio_get_time_ns(indio_dev)); kfree(scan); done: -- 2.47.3