From d69a23cedf782704f6155c2971e836d9b30a2157 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 10 Aug 2011 11:41:59 -0500 Subject: PM: runtime: add might_sleep to PM runtime functions The list of functions that can be called in atomic context is non-intuitive (pm_runtime_put_sync can not, but pm_runtime_put_sync_suspend can, if pm_runtime_irq_safe has been called?). The code is actively misleading - the entry points all start with spin_lock_irqsave, suggesting they are safe to call in atomic context, but may later enable interrupts. Add might_sleep_if to all the __pm_runtime_* entry points to enforce correct usage. Also add pm_runtime_put_sync_autosuspend to the list of functions that can be called in atomic context. Change-Id: Icac17a10d77c64d44bd2761a91a588dfd1d0c6f0 Signed-off-by: Colin Cross --- Documentation/power/runtime_pm.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index d3710dc6d25f..b0ee95e99ff7 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt @@ -483,6 +483,7 @@ pm_runtime_resume() pm_runtime_get_sync() pm_runtime_put_sync() pm_runtime_put_sync_suspend() +pm_runtime_put_sync_autosuspend() 5. Runtime PM Initialization, Device Probing and Removal -- cgit v1.2.3