aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/mailbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/mailbox.c')
-rw-r--r--arch/arm/plat-omap/mailbox.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 45a77df668f1..1945ddfec18d 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -116,8 +116,8 @@ static void mbox_tx_work(struct work_struct *work)
116 } 116 }
117 117
118 spin_lock(q->queue_lock); 118 spin_lock(q->queue_lock);
119 blkdev_dequeue_request(rq); 119 if (__blk_end_request(rq, 0, 0))
120 end_that_request_last(rq, 0); 120 BUG();
121 spin_unlock(q->queue_lock); 121 spin_unlock(q->queue_lock);
122 } 122 }
123} 123}
@@ -149,10 +149,8 @@ static void mbox_rx_work(struct work_struct *work)
149 149
150 msg = (mbox_msg_t) rq->data; 150 msg = (mbox_msg_t) rq->data;
151 151
152 spin_lock_irqsave(q->queue_lock, flags); 152 if (blk_end_request(rq, 0, 0))
153 blkdev_dequeue_request(rq); 153 BUG();
154 end_that_request_last(rq, 0);
155 spin_unlock_irqrestore(q->queue_lock, flags);
156 154
157 mbox->rxq->callback((void *)msg); 155 mbox->rxq->callback((void *)msg);
158 } 156 }
@@ -263,10 +261,8 @@ omap_mbox_read(struct device *dev, struct device_attribute *attr, char *buf)
263 261
264 *p = (mbox_msg_t) rq->data; 262 *p = (mbox_msg_t) rq->data;
265 263
266 spin_lock_irqsave(q->queue_lock, flags); 264 if (blk_end_request(rq, 0, 0))
267 blkdev_dequeue_request(rq); 265 BUG();
268 end_that_request_last(rq, 0);
269 spin_unlock_irqrestore(q->queue_lock, flags);
270 266
271 if (unlikely(mbox_seq_test(mbox, *p))) { 267 if (unlikely(mbox_seq_test(mbox, *p))) {
272 pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p); 268 pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p);