Skip to content

Commit c5f6f4f

Browse files
arndbgregkh
authored andcommitted
staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
commit 105967ad68d2eb1a041bc041f9cf96af2a653b65 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: 2914854 ("staging:iio:resolver:ad2s1210 minimal chan spec conversion.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent dc978e9 commit c5f6f4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/staging/iio/resolver/ad2s1210.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
468468
long m)
469469
{
470470
struct ad2s1210_state *st = iio_priv(indio_dev);
471-
bool negative;
471+
u16 negative;
472472
int ret = 0;
473473
u16 pos;
474474
s16 vel;

0 commit comments

Comments
 (0)