diff options
author | Matt Ranostay <mranostay@gmail.com> | 2015-11-07 20:21:28 -0800 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-11-21 15:57:04 +0000 |
commit | 8386c27587594899e4b638010fa0187fe068b295 (patch) | |
tree | 3601279afa18f53cddca9a5633281e153abede02 /drivers/iio | |
parent | 45a6b8218df54087c3bb8dc731424d8789d31790 (diff) |
iio: light: apds9960: correct ->last_busy count
Add missing pm_runtime_mark_last_busy to apds9960_set_power_state
function.
Unless pm_runtime_mark_last_busy is called the
pm_runtime_put_autosuspend may put the device into suspend before the
delay time requested.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/light/apds9960.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index 7d269ef9e062..f6a07dc32ae4 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -453,6 +453,7 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on) usleep_range(data->als_adc_int_us, APDS9960_MAX_INT_TIME_IN_US); } else { + pm_runtime_mark_last_busy(dev); ret = pm_runtime_put_autosuspend(dev); } |