diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-10-13 12:05:42 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-10-18 21:48:50 +0300 |
commit | 9299b503db31e86d24a67e3074d525c7496e5857 (patch) | |
tree | 6e124ed08a98e8d785d38afbcb334136b2c2dbbb /drivers/iio | |
parent | 5617f22b236d62e3d5beefa2fea3334ccb8656d3 (diff) | |
download | linux-9299b503db31e86d24a67e3074d525c7496e5857.tar.xz |
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] *<noident>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/mcp320x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c index 38bf10085696..465c7625a55a 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 */ |