lkml.org 
[lkml]   [2015]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/2] mailbox: check for bit set before polling
    Date
    From: Jassi Brar <jassisinghbrar@gmail.com>

    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 | 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


    \
     
     \ /
      Last update: 2015-02-02 08:41    [W:3.344 / U:1.652 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site