Commit c5f6f4fe authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read

commit 105967ad upstream.

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: 29148543 ("staging:iio:resolver:ad2s1210 minimal chan spec conversion.")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dc978e9b
...@@ -468,7 +468,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev, ...@@ -468,7 +468,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
long m) long m)
{ {
struct ad2s1210_state *st = iio_priv(indio_dev); struct ad2s1210_state *st = iio_priv(indio_dev);
bool negative; u16 negative;
int ret = 0; int ret = 0;
u16 pos; u16 pos;
s16 vel; s16 vel;
......
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