lkml.org 
[lkml]   [2010]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[tip:core/locking] irda: Semaphore cleanup
    Commit-ID:  db7f859ec53c0bfaf3520afe2feafd18a27e48fb
    Gitweb: http://git.kernel.org/tip/db7f859ec53c0bfaf3520afe2feafd18a27e48fb
    Author: Thomas Gleixner <tglx@linutronix.de>
    AuthorDate: Tue, 7 Sep 2010 14:32:30 +0000
    Committer: Thomas Gleixner <tglx@linutronix.de>
    CommitDate: Tue, 12 Oct 2010 17:36:09 +0200

    irda: Semaphore cleanup

    Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Christoph Hellwig <hch@infradead.org>
    Acked-by: "David S. Miller" <davem@davemloft.net>
    LKML-Reference: <20100907125055.651362456@linutronix.de>

    ---
    drivers/net/irda/sir_dev.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c
    index 1b051da..51d7444 100644
    --- a/drivers/net/irda/sir_dev.c
    +++ b/drivers/net/irda/sir_dev.c
    @@ -909,7 +909,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n
    dev->tx_skb = NULL;

    spin_lock_init(&dev->tx_lock);
    - init_MUTEX(&dev->fsm.sem);
    + sema_init(&dev->fsm.sem, 1);

    dev->drv = drv;
    dev->netdev = ndev;

    \
     
     \ /
      Last update: 2010-10-12 17:55    [W:0.025 / U:237.932 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site