[PATCH] iio:adc:ad7298 Mark the rx and tx buffers as big endian.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sparse shows that these two buffers should be __be16
rather than unsigned short when one enables endian
checks.

Signed-off-by: Jonathan Cameron <jic23@xxxxxxxxxx>
Reported-by: fengguang.wu@xxxxxxxxx
---
 drivers/iio/adc/ad7298.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c
index 441a9a2..2691ad9 100644
--- a/drivers/iio/adc/ad7298.c
+++ b/drivers/iio/adc/ad7298.c
@@ -54,8 +54,8 @@ struct ad7298_state {
 	 * DMA (thus cache coherency maintenance) requires the
 	 * transfer buffers to live in their own cache lines.
 	 */
-	unsigned short			rx_buf[12] ____cacheline_aligned;
-	unsigned short			tx_buf[2];
+	__be16			rx_buf[12] ____cacheline_aligned;
+	__be16			tx_buf[2];
 };
 
 #define AD7298_V_CHAN(index)						\
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux