From: Linus Walleij Date: Tue, 16 Aug 2016 13:33:28 +0000 (+0200) Subject: iio: accel: kxsd9: Fix raw read return X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7ac61a062f3147dc23e3f12b9dfe7c4dd35f9cb8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iio: accel: kxsd9: Fix raw read return Any readings from the raw interface of the KXSD9 driver will return an empty string, because it does not return IIO_VAL_INT but rather some random value from the accelerometer to the caller. Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c index 3a9f106787d2..da5fb67ecb34 100644 --- a/drivers/iio/accel/kxsd9.c +++ b/drivers/iio/accel/kxsd9.c @@ -160,6 +160,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev, if (ret < 0) goto error_ret; *val = ret; + ret = IIO_VAL_INT; break; case IIO_CHAN_INFO_SCALE: ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C));