From 6a77e3f65130ad0fbc9b305e93efca59202b3626 Mon Sep 17 00:00:00 2001 From: Brian Masney Date: Sat, 12 Nov 2016 13:19:17 -0500 Subject: [PATCH] staging: iio: tsl2583: remove unnecessary chip status check in taos_get_lux 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 Signed-off-by: Jonathan Cameron --- drivers/staging/iio/light/tsl2583.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c index de54e7429672..a550023fa910 100644 --- a/drivers/staging/iio/light/tsl2583.c +++ b/drivers/staging/iio/light/tsl2583.c @@ -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"); -- 2.20.1