diff mbox series

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

Message ID 20240624193210.347434-1-jic23@kernel.org (mailing list archive)
State Accepted
Headers show
Series iio: adc: ltc2309: Fix endian type passed to be16_to_cpu() | expand

Commit Message

Jonathan Cameron June 24, 2024, 7:32 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Picked up by sparse.

Cc: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/adc/ltc2309.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Liam Beguin June 25, 2024, 3:21 p.m. UTC | #1
On Mon, Jun 24, 2024 at 08:32:10PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Picked up by sparse.
> 
> Cc: Liam Beguin <liambeguin@gmail.com>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Reviewed-by: Liam Beguin <liambeguin@gmail.com>

> ---
>  drivers/iio/adc/ltc2309.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ltc2309.c b/drivers/iio/adc/ltc2309.c
> index 888a71454070..5f0d947d0615 100644
> --- a/drivers/iio/adc/ltc2309.c
> +++ b/drivers/iio/adc/ltc2309.c
> @@ -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) |
> -- 
> 2.45.2
>
Jonathan Cameron June 28, 2024, 7:04 p.m. UTC | #2
On Tue, 25 Jun 2024 11:21:26 -0400
Liam Beguin <liambeguin@gmail.com> wrote:

> On Mon, Jun 24, 2024 at 08:32:10PM +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Picked up by sparse.
> > 
> > Cc: Liam Beguin <liambeguin@gmail.com>
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>  
> 
> Reviewed-by: Liam Beguin <liambeguin@gmail.com>
Applied
> 
> > ---
> >  drivers/iio/adc/ltc2309.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/adc/ltc2309.c b/drivers/iio/adc/ltc2309.c
> > index 888a71454070..5f0d947d0615 100644
> > --- a/drivers/iio/adc/ltc2309.c
> > +++ b/drivers/iio/adc/ltc2309.c
> > @@ -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) |
> > -- 
> > 2.45.2
> >
diff mbox series

Patch

diff --git a/drivers/iio/adc/ltc2309.c b/drivers/iio/adc/ltc2309.c
index 888a71454070..5f0d947d0615 100644
--- a/drivers/iio/adc/ltc2309.c
+++ b/drivers/iio/adc/ltc2309.c
@@ -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) |