From: Alan Stern Date: Mon, 26 Mar 2012 20:46:52 +0000 (+0200) Subject: PM / Runtime: don't forget to wake up waitqueue on failure X-Git-Tag: v3.4-rc2~19^2~9^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2791d733a2f06997b573d1a3cfde21e6f529826;p=pandora-kernel.git PM / Runtime: don't forget to wake up waitqueue on failure This patch (as1535) fixes a bug in the runtime PM core. When a runtime suspend attempt completes, whether successfully or not, the device's power.wait_queue is supposed to be signalled. But this doesn't happen in the failure pathway of rpm_suspend() when another autosuspend attempt is rescheduled. As a result, a task can get stuck indefinitely on the wait queue (I have seen this happen in testing). The patch fixes the problem by moving the wake_up_all() call up near the start of the failure code. Signed-off-by: Alan Stern CC: Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed