From: Rafael J. Wysocki Date: Thu, 3 Dec 2009 19:21:21 +0000 (+0100) Subject: PM / Runtime: Fix lockdep warning in __pm_runtime_set_status() X-Git-Tag: v2.6.32.2~140 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7f112f35f0da073a10d4d3bfdfcef2955555e4f7;p=karo-tx-linux.git PM / Runtime: Fix lockdep warning in __pm_runtime_set_status() 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 Reported-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 846d89e3d122..0a4b75f834c0 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -777,7 +777,7 @@ int __pm_runtime_set_status(struct device *dev, unsigned int status) } 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