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

iio: light: acpi-als: Use iio_push_to_buffers_with_ts() to allow runtime source size check

This function allows for runtime detection of undersized storage which
can be non obvious due to the injection of a timestamp within the helper.

Cc: Gwendal Grignou <gwendal@chromium.org>
Link: https://patch.msgid.link/20250802164436.515988-8-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>

+1 -1
+1 -1
drivers/iio/light/acpi-als.c
··· 167 167 if (!pf->timestamp) 168 168 pf->timestamp = iio_get_time_ns(indio_dev); 169 169 170 - iio_push_to_buffers_with_timestamp(indio_dev, &scan, pf->timestamp); 170 + iio_push_to_buffers_with_ts(indio_dev, &scan, sizeof(scan), pf->timestamp); 171 171 out: 172 172 mutex_unlock(&als->lock); 173 173 iio_trigger_notify_done(indio_dev->trig);