Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1520329 > unrolled thread
| Started by | Brian Masney <masneyb@onstation.org> |
|---|---|
| First post | 2016-11-12 19:30 +0100 |
| Last post | 2016-11-13 13:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v4 02/26] staging: iio: tsl2583: remove unnecessary chip status check in taos_get_lux Brian Masney <masneyb@onstation.org> - 2016-11-12 19:30 +0100
Re: [PATCH v4 02/26] staging: iio: tsl2583: remove unnecessary chip status check in taos_get_lux Jonathan Cameron <jic23@kernel.org> - 2016-11-13 13:00 +0100
| From | Brian Masney <masneyb@onstation.org> |
|---|---|
| Date | 2016-11-12 19:30 +0100 |
| Subject | [PATCH v4 02/26] staging: iio: tsl2583: remove unnecessary chip status check in taos_get_lux |
| Message-ID | <sCLdT-5L4-29@gated-at.bofh.it> |
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>
---
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 de54e74..a550023 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.7.4
[toc] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-11-13 13:00 +0100 |
| Subject | Re: [PATCH v4 02/26] staging: iio: tsl2583: remove unnecessary chip status check in taos_get_lux |
| Message-ID | <sD1C2-89M-21@gated-at.bofh.it> |
| In reply to | #1520329 |
On 12/11/16 18:19, Brian Masney wrote:
> 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>
Applied.
> ---
> 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 de54e74..a550023 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");
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web