Re: [PATCH] iio: temperature: maxim_thermocouple: use IIO_DECLARE_DMA_BUFFER_WITH_TS()
From: David Lechner
Date: Fri Jul 11 2025 - 13:04:17 EST
On 7/11/25 11:41 AM, Andy Shevchenko wrote:
> On Fri, Jul 11, 2025 at 10:33:55AM -0500, David Lechner wrote:
>> Use IIO_DECLARE_DMA_BUFFER_WITH_TS() to declare the buffer used for
>> scan data. There was not any documentation explaining the buffer layout
>> previously, and this makes it self-documenting. The element type is
>> also changed to __be16 to match the format of the data read from the
>> device. This way, the count argument to IIO_DECLARE_DMA_BUFFER_WITH_TS()
>> is just the number of channels rather than needing to calculate the
>> number of bytes required.
>
> ...
>
>> +#include <asm/byteorder.h>
>
> Hmm... I see nothing about this change in the commit message.
>
It is for __be16. I kind of assumed that would be obvious, but sure,
better to be explicit about it.