Patchwork [6/8] donauboe: replace excessive udelay with msleep

login
register
mail settings
Submitter mathieu.poirier@linaro.org
Date April 20, 2012, 8:56 p.m.
Message ID <1334955376-17793-7-git-send-email-mathieu.poirier@linaro.org>
Download mbox | patch
Permalink /patch/154144/
State Accepted
Delegated to: David Miller
Headers show

Comments

mathieu.poirier@linaro.org - April 20, 2012, 8:56 p.m.
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(-)

Patch

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