diff options
Diffstat (limited to 'block/blk-pm.c')
-rw-r--r-- | block/blk-pm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/block/blk-pm.c b/block/blk-pm.c index f8fdae01bea2..0a028c189897 100644 --- a/block/blk-pm.c +++ b/block/blk-pm.c | |||
@@ -89,12 +89,12 @@ int blk_pre_runtime_suspend(struct request_queue *q) | |||
89 | /* Switch q_usage_counter back to per-cpu mode. */ | 89 | /* Switch q_usage_counter back to per-cpu mode. */ |
90 | blk_mq_unfreeze_queue(q); | 90 | blk_mq_unfreeze_queue(q); |
91 | 91 | ||
92 | spin_lock_irq(q->queue_lock); | 92 | spin_lock_irq(&q->queue_lock); |
93 | if (ret < 0) | 93 | if (ret < 0) |
94 | pm_runtime_mark_last_busy(q->dev); | 94 | pm_runtime_mark_last_busy(q->dev); |
95 | else | 95 | else |
96 | q->rpm_status = RPM_SUSPENDING; | 96 | q->rpm_status = RPM_SUSPENDING; |
97 | spin_unlock_irq(q->queue_lock); | 97 | spin_unlock_irq(&q->queue_lock); |
98 | 98 | ||
99 | if (ret) | 99 | if (ret) |
100 | blk_clear_pm_only(q); | 100 | blk_clear_pm_only(q); |
@@ -121,14 +121,14 @@ void blk_post_runtime_suspend(struct request_queue *q, int err) | |||
121 | if (!q->dev) | 121 | if (!q->dev) |
122 | return; | 122 | return; |
123 | 123 | ||
124 | spin_lock_irq(q->queue_lock); | 124 | spin_lock_irq(&q->queue_lock); |
125 | if (!err) { | 125 | if (!err) { |
126 | q->rpm_status = RPM_SUSPENDED; | 126 | q->rpm_status = RPM_SUSPENDED; |
127 | } else { | 127 | } else { |
128 | q->rpm_status = RPM_ACTIVE; | 128 | q->rpm_status = RPM_ACTIVE; |
129 | pm_runtime_mark_last_busy(q->dev); | 129 | pm_runtime_mark_last_busy(q->dev); |
130 | } | 130 | } |
131 | spin_unlock_irq(q->queue_lock); | 131 | spin_unlock_irq(&q->queue_lock); |
132 | 132 | ||
133 | if (err) | 133 | if (err) |
134 | blk_clear_pm_only(q); | 134 | blk_clear_pm_only(q); |
@@ -151,9 +151,9 @@ void blk_pre_runtime_resume(struct request_queue *q) | |||
151 | if (!q->dev) | 151 | if (!q->dev) |
152 | return; | 152 | return; |
153 | 153 | ||
154 | spin_lock_irq(q->queue_lock); | 154 | spin_lock_irq(&q->queue_lock); |
155 | q->rpm_status = RPM_RESUMING; | 155 | q->rpm_status = RPM_RESUMING; |
156 | spin_unlock_irq(q->queue_lock); | 156 | spin_unlock_irq(&q->queue_lock); |
157 | } | 157 | } |
158 | EXPORT_SYMBOL(blk_pre_runtime_resume); | 158 | EXPORT_SYMBOL(blk_pre_runtime_resume); |
159 | 159 | ||
@@ -176,7 +176,7 @@ void blk_post_runtime_resume(struct request_queue *q, int err) | |||
176 | if (!q->dev) | 176 | if (!q->dev) |
177 | return; | 177 | return; |
178 | 178 | ||
179 | spin_lock_irq(q->queue_lock); | 179 | spin_lock_irq(&q->queue_lock); |
180 | if (!err) { | 180 | if (!err) { |
181 | q->rpm_status = RPM_ACTIVE; | 181 | q->rpm_status = RPM_ACTIVE; |
182 | pm_runtime_mark_last_busy(q->dev); | 182 | pm_runtime_mark_last_busy(q->dev); |
@@ -184,7 +184,7 @@ void blk_post_runtime_resume(struct request_queue *q, int err) | |||
184 | } else { | 184 | } else { |
185 | q->rpm_status = RPM_SUSPENDED; | 185 | q->rpm_status = RPM_SUSPENDED; |
186 | } | 186 | } |
187 | spin_unlock_irq(q->queue_lock); | 187 | spin_unlock_irq(&q->queue_lock); |
188 | 188 | ||
189 | if (!err) | 189 | if (!err) |
190 | blk_clear_pm_only(q); | 190 | blk_clear_pm_only(q); |
@@ -207,10 +207,10 @@ EXPORT_SYMBOL(blk_post_runtime_resume); | |||
207 | */ | 207 | */ |
208 | void blk_set_runtime_active(struct request_queue *q) | 208 | void blk_set_runtime_active(struct request_queue *q) |
209 | { | 209 | { |
210 | spin_lock_irq(q->queue_lock); | 210 | spin_lock_irq(&q->queue_lock); |
211 | q->rpm_status = RPM_ACTIVE; | 211 | q->rpm_status = RPM_ACTIVE; |
212 | pm_runtime_mark_last_busy(q->dev); | 212 | pm_runtime_mark_last_busy(q->dev); |
213 | pm_request_autosuspend(q->dev); | 213 | pm_request_autosuspend(q->dev); |
214 | spin_unlock_irq(q->queue_lock); | 214 | spin_unlock_irq(&q->queue_lock); |
215 | } | 215 | } |
216 | EXPORT_SYMBOL(blk_set_runtime_active); | 216 | EXPORT_SYMBOL(blk_set_runtime_active); |