Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: dummy: Switch to iio_push_to_buffers_with_ts() and provide size of storage

Provide the storage size so that the helper can sanity check that it
is large enough for the configured channels.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250413103443.2420727-8-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+2 -2
+2 -2
drivers/iio/dummy/iio_simple_dummy_buffer.c
··· 83 83 iio_for_each_active_channel(indio_dev, j) 84 84 scan->data[i++] = fakedata[j]; 85 85 86 - iio_push_to_buffers_with_timestamp(indio_dev, scan, 87 - iio_get_time_ns(indio_dev)); 86 + iio_push_to_buffers_with_ts(indio_dev, scan, sizeof(*scan), 87 + iio_get_time_ns(indio_dev)); 88 88 89 89 kfree(scan); 90 90 done: