From: Jonathan Cameron Date: Sun, 13 Oct 2019 09:05:42 +0000 (+0100) Subject: iio: adc: mcp320x: Tidy up endian types in type cast. X-Git-Tag: v5.5-rc1~135^2~130^2~26 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9299b503db31e86d24a67e3074d525c7496e5857;p=users%2Fjedix%2Flinux-maple.git iio: adc: mcp320x: Tidy up endian types in type cast. Fixes the sparse warning: drivers/iio/adc/mcp320x.c:167:41: warning: incorrect type in argument 1 (different base types) drivers/iio/adc/mcp320x.c:167:41: expected restricted __be32 const [usertype] *p drivers/iio/adc/mcp320x.c:167:41: got unsigned int [usertype] * Signed-off-by: Jonathan Cameron Reviewed-by: Lukas Wunner --- diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c index 38bf100856967..465c7625a55a4 100644 --- a/drivers/iio/adc/mcp320x.c +++ b/drivers/iio/adc/mcp320x.c @@ -164,7 +164,7 @@ static int mcp320x_adc_conversion(struct mcp320x *adc, u8 channel, case mcp3550_60: case mcp3551: case mcp3553: { - u32 raw = be32_to_cpup((u32 *)adc->rx_buf); + u32 raw = be32_to_cpup((__be32 *)adc->rx_buf); if (!(adc->spi->mode & SPI_CPOL)) raw <<= 1; /* strip Data Ready bit in SPI mode 0,0 */