From 5668bfdd90cd7b330aa25a5ff853b55dc224d13d Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Mon, 1 Aug 2016 11:54:38 +0200 Subject: 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 Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck Acked-by: Olof Johansson Signed-off-by: Jonathan Cameron --- drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/iio') 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); -- cgit v1.2.3-59-g8ed1b