Skip to content

Commit

Permalink
iio: light: apds9960: correct ->last_busy count
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matt Ranostay authored and Jonathan Cameron committed Nov 21, 2015
1 parent 45a6b82 commit 8386c27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iio/light/apds9960.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8386c27

Please sign in to comment.