mailbox: check for bit set before polling
authorJassi Brar <jassisinghbrar@gmail.com>
Fri, 12 Dec 2014 09:52:49 +0000 (15:22 +0530)
committerJassi Brar <jaswinder.singh@linaro.org>
Fri, 6 Feb 2015 05:28:05 +0000 (10:58 +0530)
Before polling we just need to see if the TXDONE_BY_POLL bit
is set in txdone_method. There may be another bit (method)
specified as well, like TXDONE_BY_ACK.

Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
drivers/mailbox/mailbox.c

index 59aad4d..19b491d 100644 (file)
@@ -87,7 +87,7 @@ static void msg_submit(struct mbox_chan *chan)
 exit:
        spin_unlock_irqrestore(&chan->lock, flags);
 
-       if (!err && chan->txdone_method == TXDONE_BY_POLL)
+       if (!err && (chan->txdone_method & TXDONE_BY_POLL))
                poll_txdone((unsigned long)chan->mbox);
 }