summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-07-14 12:31:03 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2017-07-15 14:41:54 +0300
commit105967ad68d2eb1a041bc041f9cf96af2a653b65 (patch)
treef471eb06f84aaa8924f3bc70087907f21f3bf2ea /drivers/staging
parent3091141d7803608950adc001518ffb544a4e3308 (diff)
downloadlinux-105967ad68d2eb1a041bc041f9cf96af2a653b65.tar.xz
staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
gcc-7 points out an older regression: drivers/staging/iio/resolver/ad2s1210.c: In function 'ad2s1210_read_raw': drivers/staging/iio/resolver/ad2s1210.c:515:42: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] The original code had 'unsigned short' here, but incorrectly got converted to 'bool'. This reverts the regression and uses a normal type instead. Fixes: 29148543c521 ("staging:iio:resolver:ad2s1210 minimal chan spec conversion.") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/iio/resolver/ad2s1210.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index a6a8393d6664..3e00df74b18c 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -472,7 +472,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
long m)
{
struct ad2s1210_state *st = iio_priv(indio_dev);
- bool negative;
+ u16 negative;
int ret = 0;
u16 pos;
s16 vel;