aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>2016-08-01 11:54:38 +0200
committerJonathan Cameron <jic23@kernel.org>2016-10-25 18:20:32 +0100
commit5668bfdd90cd7b330aa25a5ff853b55dc224d13d (patch)
treeea3c20565fcb4626c5a6221e62ff92f83f58b478 /drivers/iio
parentplatform/chrome: Introduce a new function to check EC features. (diff)
downloadlinux-dev-5668bfdd90cd7b330aa25a5ff853b55dc224d13d.tar.xz
linux-dev-5668bfdd90cd7b330aa25a5ff853b55dc224d13d.zip
platform/chrome: cros_ec_dev - Register cros-ec sensors
Check whether the ChromeOS Embedded Controller is a sensor hub and in such case issue a command to get the number of sensors and register them all. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Guenter Roeck <groeck@chromium.org> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c
index 48edeba35b83..d6c372bb433b 100644
--- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c
+++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c
@@ -51,7 +51,7 @@ static int cros_ec_sensors_read(struct iio_dev *indio_dev,
s16 data = 0;
s64 val64;
int i;
- int ret = IIO_VAL_INT;
+ int ret;
int idx = chan->scan_index;
mutex_lock(&st->core.cmd_lock);
@@ -137,7 +137,7 @@ static int cros_ec_sensors_write(struct iio_dev *indio_dev,
{
struct cros_ec_sensors_state *st = iio_priv(indio_dev);
int i;
- int ret = 0;
+ int ret;
int idx = chan->scan_index;
mutex_lock(&st->core.cmd_lock);