From: Rafael J. Wysocki Date: Mon, 19 Aug 2013 23:42:32 +0000 (+0200) Subject: ACPI / PM: Hold acpi_scan_lock over system PM transitions X-Git-Tag: v3.12-rc1~178^2~16^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad07277e82dedabacc52c82746633680a3187d25;p=pandora-kernel.git ACPI / PM: Hold acpi_scan_lock over system PM transitions Bad things happen if ACPI hotplug events are handled during system PM transitions, especially if devices are removed as a result. To prevent those bad things from happening, acquire acpi_scan_lock when a PM transition is started and release it when that transition is complete or has been aborted. This fixes resume lockup on my test-bed Acer Aspire S5 that happens when Thunderbolt devices are disconnected from the machine while suspended. Also fixes the analogous problem for Mika Westerberg on an Intel DZ77RE-75K board. Signed-off-by: Rafael J. Wysocki Tested-by: Mika Westerberg Acked-by: Toshi Kani --- Reading git-diff-tree failed