Patchwork [7/8] sungem: use mdelay instead of udelay where necessary

login
register
mail settings
Submitter mathieu.poirier@linaro.org
Date April 20, 2012, 8:56 p.m.
Message ID <1334955376-17793-8-git-send-email-mathieu.poirier@linaro.org>
Download mbox | patch
Permalink /patch/154141/
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>

Some architectures like ARM cannot handle large numbers as
arguments to udelay, so the drivers should use mdelay when
delaying for multiple miliseconds.

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

Patch

diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c
index 558409f..26c1a2c 100644
--- a/drivers/net/ethernet/sun/sungem.c
+++ b/drivers/net/ethernet/sun/sungem.c
@@ -401,7 +401,7 @@  static int gem_rxmac_reset(struct gem *gp)
 		return 1;
 	}
 
-	udelay(5000);
+	mdelay(5);
 
 	/* Execute RX reset command. */
 	writel(gp->swrst_base | GREG_SWRST_RXRST,