]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: iio: tsl2583: remove unnecessary chip status check in taos_get_lux
authorBrian Masney <masneyb@onstation.org>
Sat, 12 Nov 2016 18:19:17 +0000 (13:19 -0500)
committerJonathan Cameron <jic23@kernel.org>
Sun, 13 Nov 2016 13:07:18 +0000 (13:07 +0000)
taos_get_lux checks to see if the chip is in a working state. This
check is not necessary since it is only called from tsl2583_read_raw
and in_illuminance_calibrate_store (via taos_als_calibrate). The chip
state is already checked by these functions.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2583.c

index de54e74296726326a9c22b43a2ff957c42c6af12..a550023fa910a85c4ca137a9fd64594df40dbf4b 100644 (file)
@@ -178,13 +178,6 @@ static int taos_get_lux(struct iio_dev *indio_dev)
        u32 ch0lux = 0;
        u32 ch1lux = 0;
 
-       if (chip->taos_chip_status != TSL258X_CHIP_WORKING) {
-               /* device is not enabled */
-               dev_err(&chip->client->dev, "taos_get_lux device is not enabled\n");
-               ret = -EBUSY;
-               goto done;
-       }
-
        ret = i2c_smbus_read_byte_data(chip->client, TSL258X_CMD_REG);
        if (ret < 0) {
                dev_err(&chip->client->dev, "taos_get_lux failed to read CMD_REG\n");