lkml.org 
[lkml]   [2012]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6/8] donauboe: replace excessive udelay with msleep
    Date
    From: Arnd Bergmann <arnd@arndb.de>

    No driver should spin the CPU for 10ms, so better use
    an msleep, which is allowed in the ->suspend function.

    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
    ---
    drivers/net/irda/donauboe.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
    index 4351296..510b9c8 100644
    --- a/drivers/net/irda/donauboe.c
    +++ b/drivers/net/irda/donauboe.c
    @@ -1710,7 +1710,7 @@ toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap)

    /* Flush all packets */
    while ((i--) && (self->txpending))
    - udelay (10000);
    + msleep(10);

    spin_lock_irqsave(&self->spinlock, flags);

    --
    1.7.5.4


    \
     
     \ /
      Last update: 2012-04-20 22:59    [W:0.020 / U:31.476 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site