Skip to content

Commit 6d06978

Browse files
dlechjic23
authored andcommitted
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á <[email protected]> Signed-off-by: David Lechner <[email protected]> Link: https://patch.msgid.link/20250507-iio-introduce-iio_declare_buffer_with_ts-v6-5-4aee1b9f1b89@baylibre.com Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 76a67e3 commit 6d06978

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/iio/adc/ad7380.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,8 +909,7 @@ struct ad7380_state {
909909
* Make the buffer large enough for MAX_NUM_CHANNELS 32-bit samples and
910910
* one 64-bit aligned 64-bit timestamp.
911911
*/
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));
914913
/* buffers for reading/writing registers */
915914
u16 tx;
916915
u16 rx;

0 commit comments

Comments
 (0)