mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
PM / Runtime: fix recursive locking warning of lockdep from rpm_resume()
For device with no_callbacks flag set, its power lock and its parent's power lock may be held nestedly in rpm_resume, so we should take spin_lock_nested(lock, SINGLE_DEPTH_NESTING) to acquire parent power lock to avoid lockdep warning. Signed-off-by: Ming Lei <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
9c03439253
commit
d63be5f924
1 changed files with 1 additions and 1 deletions
|
|
@ -503,7 +503,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
|
|||
* the resume will actually succeed.
|
||||
*/
|
||||
if (dev->power.no_callbacks && !parent && dev->parent) {
|
||||
spin_lock(&dev->parent->power.lock);
|
||||
spin_lock_nested(&dev->parent->power.lock, SINGLE_DEPTH_NESTING);
|
||||
if (dev->parent->power.disable_depth > 0
|
||||
|| dev->parent->power.ignore_children
|
||||
|| dev->parent->power.runtime_status == RPM_ACTIVE) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue