Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932680AbbBBHTm (ORCPT ); Mon, 2 Feb 2015 02:19:42 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:38266 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751257AbbBBHTk (ORCPT ); Mon, 2 Feb 2015 02:19:40 -0500 From: Jassi Brar To: linux-kernel@vger.kernel.org Cc: Jassi Brar Subject: [PATCH 1/2] mailbox: check for bit set before polling Date: Mon, 2 Feb 2015 12:49:04 +0530 Message-Id: <1422861544-20667-1-git-send-email-jaswinder.singh@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1036 Lines: 32 From: Jassi Brar 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 --- drivers/mailbox/mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index 59aad4d..19b491d 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -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); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/