diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-04 12:59:48 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-04 12:59:48 -0700 |
commit | a34d5df85ebb8317592360b1611354f8b9853e55 (patch) | |
tree | bf2b33ed71ce836a1bed5e19a31ee12fd4c4a3f1 /drivers/iio/light | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) | |
parent | 655048a0b98bc6288ce87cb95a18bf4cada6c1a9 (diff) |
Merge tag 'iio-fixes-for-4.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into usb-linus
Jonathan writes:
First round of IIO fixes for the 4.6 cycle.
Again I've ended up with two early fix sets, depending on whether they are
dependent on elements of the merge window or simply came in after I had
patches with that dependency already, vs older fixes that were just too
late for the last cycle. This first set is for the older ones.
- max1353
* Add a missing adc to max1363_id - the driver has supported the
max11644-11647 for a while, but as they weren't in the id table there
was no way of actually initializing it.
* Fix a wrong reference voltage for the above models. Given you couldn't
initialize the driver for these parts without patching, no one noticed
that the reference voltage used in computing the scaling was wrong.
- apds9960
* The fifo last enelement was read twice (and hence pushed out twice) due
to a small logic bug.
Diffstat (limited to 'drivers/iio/light')
-rw-r--r-- | drivers/iio/light/apds9960.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index f6a07dc32ae4..a6af56ad10e1 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -769,7 +769,7 @@ static void apds9960_read_gesture_fifo(struct apds9960_data *data) mutex_lock(&data->lock); data->gesture_mode_running = 1; - while (cnt-- || (cnt = apds9660_fifo_is_empty(data) > 0)) { + while (cnt || (cnt = apds9660_fifo_is_empty(data) > 0)) { ret = regmap_bulk_read(data->regmap, APDS9960_REG_GFIFO_BASE, &data->buffer, 4); @@ -777,6 +777,7 @@ static void apds9960_read_gesture_fifo(struct apds9960_data *data) goto err_read; iio_push_to_buffers(data->indio_dev, data->buffer); + cnt--; } err_read: |