summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeodora Baluta <teodora.baluta@intel.com>2014-07-28 12:18:00 +0100
committerJonathan Cameron <jic23@kernel.org>2014-08-02 17:42:00 +0100
commit7557138a943bf460e56972b8b9f45d535a473a3c (patch)
tree56f453f7e49db8e946dc5578dcdf72f6bfead73b
parent18210923ab663c799d1c218e4fc998a8f0f87765 (diff)
staging: iio: adis16240: fix sparse warnings regarding incorrect argument type
Silence the following sparse warnings by changing cast from u16 to __be16: CHECK drivers/staging/iio/accel/adis16240_core.c drivers/staging/iio/accel/adis16240_core.c:128:51: warning: incorrect type in argument 3 (different signedness) drivers/staging/iio/accel/adis16240_core.c:128:51: expected unsigned short [usertype] *val drivers/staging/iio/accel/adis16240_core.c:128:51: got signed short *<noident> drivers/staging/iio/accel/adis16240_core.c:142:51: warning: incorrect type in argument 3 (different signedness) drivers/staging/iio/accel/adis16240_core.c:142:51: expected unsigned short [usertype] *val drivers/staging/iio/accel/adis16240_core.c:142:51: got signed short *<noident> Signed-off-by: Teodora Baluta <teodora.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/staging/iio/resolver/ad2s1210.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index 7fbaba41c872..1360099fdaea 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -491,7 +491,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
switch (chan->type) {
case IIO_ANGL:
- pos = be16_to_cpup((u16 *)st->rx);
+ pos = be16_to_cpup((__be16 *) st->rx);
if (st->hysteresis)
pos >>= 16 - st->resolution;
*val = pos;
@@ -499,7 +499,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
break;
case IIO_ANGL_VEL:
negative = st->rx[0] & 0x80;
- vel = be16_to_cpup((s16 *)st->rx);
+ vel = be16_to_cpup((__be16 *) st->rx);
vel >>= 16 - st->resolution;
if (vel & 0x8000) {
negative = (0xffff >> st->resolution) << st->resolution;