]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
r6040: fix bad usage of udelay
authorFlorian Fainelli <florian.fainelli@telecomint.eu>
Wed, 3 Sep 2008 14:50:03 +0000 (16:50 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 24 Sep 2008 22:54:43 +0000 (18:54 -0400)
This patch fixes the bad usage of udelay(5000), which in turns is a
mdelay(5). It causes compilation for ARM where udelay maximum value
is checked.

Reported-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/r6040.c

index 5d86281d9363df82406cdadd609dbb019cfd55d3..025f526558bc83040aff3db99bc90927ec2203a2 100644 (file)
@@ -370,7 +370,7 @@ static void r6040_init_mac_regs(struct net_device *dev)
        /* Reset internal state machine */
        iowrite16(2, ioaddr + MAC_SM);
        iowrite16(0, ioaddr + MAC_SM);
-       udelay(5000);
+       mdelay(5);
 
        /* MAC Bus Control Register */
        iowrite16(MBCR_DEFAULT, ioaddr + MBCR);
@@ -806,7 +806,7 @@ static void r6040_mac_address(struct net_device *dev)
        iowrite16(0x01, ioaddr + MCR1); /* Reset MAC */
        iowrite16(2, ioaddr + MAC_SM); /* Reset internal state machine */
        iowrite16(0, ioaddr + MAC_SM);
-       udelay(5000);
+       mdelay(5);
 
        /* Restore MAC Address */
        adrp = (u16 *) dev->dev_addr;