mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
PM: device_suspend/resume may sleep
This adds warning when someone tries them from atomic context. Signed-off-by: Pavel Machek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
84ed64ee8f
commit
bb84c89f94
2 changed files with 2 additions and 0 deletions
|
|
@ -96,6 +96,7 @@ void dpm_resume(void)
|
|||
|
||||
void device_resume(void)
|
||||
{
|
||||
might_sleep();
|
||||
down(&dpm_sem);
|
||||
dpm_resume();
|
||||
up(&dpm_sem);
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ int device_suspend(pm_message_t state)
|
|||
{
|
||||
int error = 0;
|
||||
|
||||
might_sleep();
|
||||
down(&dpm_sem);
|
||||
down(&dpm_list_sem);
|
||||
while (!list_empty(&dpm_active) && error == 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue