aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-11-25 07:41:00 -0500
committerJonathan Cameron <jic23@kernel.org>2013-12-03 15:22:25 -0500
commit61c358e3bc20abeab2ba2ae9625ca723409b6766 (patch)
tree1b09d9253651360fc4db92ab4fff09964731f210 /drivers/iio/dac
parentc3a09c18ed4698ff80408af7bec8ddd28608b7f5 (diff)
iio:ad5504: Mark transfer buffers as __be16
Fixes the following warnings from sparse: drivers/iio/dac/ad5504.c:71:19: warning: incorrect type in initializer (different base types) drivers/iio/dac/ad5504.c:71:19: expected unsigned short [unsigned] [usertype] tmp drivers/iio/dac/ad5504.c:71:19: got restricted __be16 [usertype] <noident> drivers/iio/dac/ad5504.c:80:19: warning: incorrect type in initializer (different base types) drivers/iio/dac/ad5504.c:80:19: expected unsigned short [unsigned] [usertype] tmp drivers/iio/dac/ad5504.c:80:19: got restricted __be16 [usertype] <noident> drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16 drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16 drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16 drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r--drivers/iio/dac/ad5504.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c
index c0957a918e17..6cd0dd60c17f 100644
--- a/drivers/iio/dac/ad5504.c
+++ b/drivers/iio/dac/ad5504.c
@@ -68,7 +68,7 @@ enum ad5504_supported_device_ids {
68 68
69static int ad5504_spi_write(struct spi_device *spi, u8 addr, u16 val) 69static int ad5504_spi_write(struct spi_device *spi, u8 addr, u16 val)
70{ 70{
71 u16 tmp = cpu_to_be16(AD5504_CMD_WRITE | 71 __be16 tmp = cpu_to_be16(AD5504_CMD_WRITE |
72 AD5504_ADDR(addr) | 72 AD5504_ADDR(addr) |
73 (val & AD5504_RES_MASK)); 73 (val & AD5504_RES_MASK));
74 74
@@ -77,8 +77,8 @@ static int ad5504_spi_write(struct spi_device *spi, u8 addr, u16 val)
77 77
78static int ad5504_spi_read(struct spi_device *spi, u8 addr) 78static int ad5504_spi_read(struct spi_device *spi, u8 addr)
79{ 79{
80 u16 tmp = cpu_to_be16(AD5504_CMD_READ | AD5504_ADDR(addr)); 80 __be16 tmp = cpu_to_be16(AD5504_CMD_READ | AD5504_ADDR(addr));
81 u16 val; 81 __be16 val;
82 int ret; 82 int ret;
83 struct spi_transfer t = { 83 struct spi_transfer t = {
84 .tx_buf = &tmp, 84 .tx_buf = &tmp,