Skip to contentSkip to conversation

iio: adc: ltc2309: Fix endian type passed to be16_to_cpu()

PATCH In review Jonathan Cameron 2 participants 3 messages Jun 24, 2024 – Jun 28, 2024 IIO

lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

PATCH 1/1 iio: adc: ltc2309: Fix endian type passed to be16_to_cpu()

From: Jonathan Cameron <[email protected]>

Picked up by sparse.

---
 drivers/iio/adc/ltc2309.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ltc2309.c +1 -1
index 888a71454070..5f0d947d0615 100644
@@ -103,7 +103,7 @@ static int ltc2309_read_raw_channel(struct ltc2309 *ltc2309,
 				    unsigned long address, int *val)
 {
 	int ret;
-	u16 buf;
+	__be16 buf;
 	u8 din;
 
 	din = FIELD_PREP(LTC2309_DIN_CH_MASK, address & 0x0f) |
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Picked up by sparse.

Quoted 20 lines
---
 drivers/iio/adc/ltc2309.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ltc2309.c +1 -1
index 888a71454070..5f0d947d0615 100644
@@ -103,7 +103,7 @@ static int ltc2309_read_raw_channel(struct ltc2309 *ltc2309,
 				    unsigned long address, int *val)
 {
 	int ret;
-	u16 buf;
+	__be16 buf;
 	u8 din;
 
 	din = FIELD_PREP(LTC2309_DIN_CH_MASK, address & 0x0f) |
Signature · 1 line
2.45.2
author maintainer Applied
#2 lore raw
Quoted 9 lines · On Tue, 25 Jun 2024 11:21:26 -0400 Liam Beguin <[email protected]> wrote:
Quoted 6 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Picked up by sparse.

Applied

Quoted 21 lines
Quoted 21 lines
---
 drivers/iio/adc/ltc2309.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ltc2309.c +1 -1
index 888a71454070..5f0d947d0615 100644
@@ -103,7 +103,7 @@ static int ltc2309_read_raw_channel(struct ltc2309 *ltc2309,
 				    unsigned long address, int *val)
 {
 	int ret;
-	u16 buf;
+	__be16 buf;
 	u8 din;
 
 	din = FIELD_PREP(LTC2309_DIN_CH_MASK, address & 0x0f) |
Signature · 1 line
2.45.2