Commit 9299b503 authored by Jonathan Cameron's avatar Jonathan Cameron

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: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarLukas Wunner <lukas@wunner.de>
parent 5617f22b
...@@ -164,7 +164,7 @@ static int mcp320x_adc_conversion(struct mcp320x *adc, u8 channel, ...@@ -164,7 +164,7 @@ static int mcp320x_adc_conversion(struct mcp320x *adc, u8 channel,
case mcp3550_60: case mcp3550_60:
case mcp3551: case mcp3551:
case mcp3553: { 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)) if (!(adc->spi->mode & SPI_CPOL))
raw <<= 1; /* strip Data Ready bit in SPI mode 0,0 */ raw <<= 1; /* strip Data Ready bit in SPI mode 0,0 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment