Commit ddab4a02 authored by Eva Rachel Retuya's avatar Eva Rachel Retuya Committed by Greg Kroah-Hartman

staging: iio: light: fix multiple assignments in a single line

Rewrite the multiple assignments to clear checkpatch check:

CHECK: multiple assignments should be avoided
Signed-off-by: default avatarEva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e537daa1
...@@ -267,7 +267,8 @@ static int taos_get_lux(struct iio_dev *indio_dev) ...@@ -267,7 +267,8 @@ static int taos_get_lux(struct iio_dev *indio_dev)
if (!ch0) { if (!ch0) {
/* have no data, so return LAST VALUE */ /* have no data, so return LAST VALUE */
ret = chip->als_cur_info.lux = 0; ret = 0;
chip->als_cur_info.lux = 0;
goto out_unlock; goto out_unlock;
} }
/* calculate ratio */ /* calculate ratio */
...@@ -292,7 +293,8 @@ static int taos_get_lux(struct iio_dev *indio_dev) ...@@ -292,7 +293,8 @@ static int taos_get_lux(struct iio_dev *indio_dev)
/* note: lux is 31 bit max at this point */ /* note: lux is 31 bit max at this point */
if (ch1lux > ch0lux) { if (ch1lux > ch0lux) {
dev_dbg(&chip->client->dev, "No Data - Return last value\n"); dev_dbg(&chip->client->dev, "No Data - Return last value\n");
ret = chip->als_cur_info.lux = 0; ret = 0;
chip->als_cur_info.lux = 0;
goto out_unlock; goto out_unlock;
} }
......
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