summaryrefslogtreecommitdiff
path: root/drivers/iio/chemical
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-28 14:33:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-28 14:33:37 +0300
commita0306db6e5758b0488c79e739de3c0ffe47ea62f (patch)
tree86d17769496f96554f89bfc3be02b645a420889f /drivers/iio/chemical
parent4bc07aa4f030d4d3e551ce8d96ca15b6424a5641 (diff)
parent3eb2ce825ea1ad89d20f7a3b5780df850e4be274 (diff)
downloadlinux-a0306db6e5758b0488c79e739de3c0ffe47ea62f.tar.xz
Merge 4.16-rc7 into staging-next
We want the IIO and staging driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/chemical')
-rw-r--r--drivers/iio/chemical/ccs811.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c
index e092ffe1431e..b4a46eb45789 100644
--- a/drivers/iio/chemical/ccs811.c
+++ b/drivers/iio/chemical/ccs811.c
@@ -133,6 +133,9 @@ static int ccs811_start_sensor_application(struct i2c_client *client)
if (ret < 0)
return ret;
+ if ((ret & CCS811_STATUS_FW_MODE_APPLICATION))
+ return 0;
+
if ((ret & CCS811_STATUS_APP_VALID_MASK) !=
CCS811_STATUS_APP_VALID_LOADED)
return -EIO;