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

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: ad7380: use IIO_DECLARE_DMA_BUFFER_WITH_TS

Use IIO_DECLARE_DMA_BUFFER_WITH_TS() to declare the buffer that gets
used with iio_push_to_buffers_with_ts(). This makes the code a bit
easier to read and understand.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-5-4aee1b9f1b89@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
6d06978f 76a67e39

+1 -2
+1 -2
drivers/iio/adc/ad7380.c
··· 909 909 * Make the buffer large enough for MAX_NUM_CHANNELS 32-bit samples and 910 910 * one 64-bit aligned 64-bit timestamp. 911 911 */ 912 - u8 scan_data[ALIGN(MAX_NUM_CHANNELS * sizeof(u32), sizeof(s64)) 913 - + sizeof(s64)] __aligned(IIO_DMA_MINALIGN); 912 + IIO_DECLARE_DMA_BUFFER_WITH_TS(u8, scan_data, MAX_NUM_CHANNELS * sizeof(u32)); 914 913 /* buffers for reading/writing registers */ 915 914 u16 tx; 916 915 u16 rx;