Commit ae8bb9b1 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

iio:ad5791: Mark transfer buffers as __be32

Fixes the following warnings from sparse:
	drivers/iio/dac/ad5791.c:114:18: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5791.c:114:18:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5791.c:114:18:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5791.c:142:21: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5791.c:142:21:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5791.c:142:21:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5791.c:144:21: warning: incorrect type in assignment (different base types)
	drivers/iio/dac/ad5791.c:144:21:    expected unsigned int [unsigned] [usertype] d32
	drivers/iio/dac/ad5791.c:144:21:    got restricted __be32 [usertype] <noident>
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
	drivers/iio/dac/ad5791.c:148:16: warning: cast to restricted __be32
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent edc05f26
...@@ -107,7 +107,7 @@ enum ad5791_supported_device_ids { ...@@ -107,7 +107,7 @@ enum ad5791_supported_device_ids {
static int ad5791_spi_write(struct spi_device *spi, u8 addr, u32 val) static int ad5791_spi_write(struct spi_device *spi, u8 addr, u32 val)
{ {
union { union {
u32 d32; __be32 d32;
u8 d8[4]; u8 d8[4];
} data; } data;
...@@ -121,7 +121,7 @@ static int ad5791_spi_write(struct spi_device *spi, u8 addr, u32 val) ...@@ -121,7 +121,7 @@ static int ad5791_spi_write(struct spi_device *spi, u8 addr, u32 val)
static int ad5791_spi_read(struct spi_device *spi, u8 addr, u32 *val) static int ad5791_spi_read(struct spi_device *spi, u8 addr, u32 *val)
{ {
union { union {
u32 d32; __be32 d32;
u8 d8[4]; u8 d8[4];
} data[3]; } data[3];
int ret; int ret;
......
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