diff options
Diffstat (limited to 'drivers/base/power/suspend.c')
-rw-r--r-- | drivers/base/power/suspend.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 1a1fe43a3057..69509e02f703 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c | |||
@@ -116,12 +116,10 @@ int device_suspend(pm_message_t state) | |||
116 | /* Check if the device got removed */ | 116 | /* Check if the device got removed */ |
117 | if (!list_empty(&dev->power.entry)) { | 117 | if (!list_empty(&dev->power.entry)) { |
118 | /* Move it to the dpm_off or dpm_off_irq list */ | 118 | /* Move it to the dpm_off or dpm_off_irq list */ |
119 | if (!error) { | 119 | if (!error) |
120 | list_del(&dev->power.entry); | 120 | list_move(&dev->power.entry, &dpm_off); |
121 | list_add(&dev->power.entry, &dpm_off); | 121 | else if (error == -EAGAIN) { |
122 | } else if (error == -EAGAIN) { | 122 | list_move(&dev->power.entry, &dpm_off_irq); |
123 | list_del(&dev->power.entry); | ||
124 | list_add(&dev->power.entry, &dpm_off_irq); | ||
125 | error = 0; | 123 | error = 0; |
126 | } | 124 | } |
127 | } | 125 | } |
@@ -139,8 +137,7 @@ int device_suspend(pm_message_t state) | |||
139 | */ | 137 | */ |
140 | while (!list_empty(&dpm_off_irq)) { | 138 | while (!list_empty(&dpm_off_irq)) { |
141 | struct list_head * entry = dpm_off_irq.next; | 139 | struct list_head * entry = dpm_off_irq.next; |
142 | list_del(entry); | 140 | list_move(entry, &dpm_off); |
143 | list_add(entry, &dpm_off); | ||
144 | } | 141 | } |
145 | dpm_resume(); | 142 | dpm_resume(); |
146 | } | 143 | } |