Commit 96e6a016 authored by Brian Masney's avatar Brian Masney Committed by Jonathan Cameron

staging: iio: tsl2x7x: remove unused variables from tsl2x7x_get_lux()

tsl2x7x_get_lux() has a ch0lux and ch1lux variables that are not used
so this patch removes them.
Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 490941db
...@@ -344,8 +344,6 @@ static int tsl2x7x_get_lux(struct iio_dev *indio_dev) ...@@ -344,8 +344,6 @@ static int tsl2x7x_get_lux(struct iio_dev *indio_dev)
struct tsl2x7x_lux *p; struct tsl2x7x_lux *p;
struct tsl2X7X_chip *chip = iio_priv(indio_dev); struct tsl2X7X_chip *chip = iio_priv(indio_dev);
int i, ret; int i, ret;
u32 ch0lux = 0;
u32 ch1lux = 0;
mutex_lock(&chip->als_mutex); mutex_lock(&chip->als_mutex);
...@@ -416,15 +414,6 @@ static int tsl2x7x_get_lux(struct iio_dev *indio_dev) ...@@ -416,15 +414,6 @@ static int tsl2x7x_get_lux(struct iio_dev *indio_dev)
tsl2x7x_als_gain[chip->settings.als_gain]); tsl2x7x_als_gain[chip->settings.als_gain]);
} }
/* note: lux is 31 bit max at this point */
if (ch1lux > ch0lux) {
dev_dbg(&chip->client->dev,
"%s: ch1lux > ch0lux; returning last value\n",
__func__);
ret = chip->als_cur_info.lux;
goto out_unlock;
}
/* adjust for active time scale */ /* adjust for active time scale */
if (chip->als_time_scale == 0) if (chip->als_time_scale == 0)
lux = 0; lux = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment