mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
Runtime PM should only be enabled in device_resume_early() if it has
been disabled for the given device by device_suspend_late(). Otherwise,
it may cause runtime PM callbacks to run prematurely in some cases
which leads to further functional issues.
Make two changes to address this problem.
First, reorder device_suspend_late() to only disable runtime PM for a
device when it is going to look for the device's callback or if the
device is a "syscore" one. In all of the other cases, disabling runtime
PM for the device is not in fact necessary. However, if the device's
callback returns an error and the power.is_late_suspended flag is not
going to be set, enable runtime PM so it only remains disabled when
power.is_late_suspended is set.
Second, make device_resume_early() only enable runtime PM for the
devices with the power.is_late_suspended flag set.
Fixes:
|
History
|
|
|---|---|---|
| .. | ||
| clock_ops.c | ||
| common.c | ||
| generic_ops.c | ||
| main.c | ||
| Makefile | ||
| power.h | ||
| qos-test.c | ||
| qos.c | ||
| runtime-test.c | ||
| runtime.c | ||
| sysfs.c | ||
| trace.c | ||
| wakeirq.c | ||
| wakeup.c | ||
| wakeup_stats.c | ||