Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8386c275 authored by Matt Ranostay's avatar Matt Ranostay Committed by Jonathan Cameron
Browse files

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: default avatarMatt Ranostay <mranostay@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 45a6b821
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
	}