[011/151] PM / Runtime: Fix lockdep warning in __pm_runtime_set_status()

Greg KH
2009-12-17T04:47:43Z

From: Rafael J. Wysocki <rjw@sisk.pl>

commit bab636b921017f0db6e0c2979438f50b898a9808 upstream.

Lockdep complains about taking the parent lock in
__pm_runtime_set_status(), so mark it as nested.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/base/power/runtime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -777,7 +777,7 @@ int __pm_runtime_set_status(struct devic
}

if (parent) {
- spin_lock(&parent->power.lock);
+ spin_lock_nested(&parent->power.lock, SINGLE_DEPTH_NESTING);

/*
* It is invalid to put an active child under a parent that is