I don't see that we're in an atomic context so there's no need to
busy-wait. Therefore replace the delay with sleep calls.
See also Documentation/timers/timers-howto.txt. It states:
"In general, use of mdelay is discouraged and code should
be refactored to allow for the use of msleep."
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
SVN-Revision: 43539
if ((t & mask) == val)
return 0;
- msleep(1);
+ usleep_range(1000, 2000);
}
return -ETIMEDOUT;
ar7240sw_disable_port(as, i);
/* Wait for transmit queues to drain. */
- msleep(2);
+ usleep_range(2000, 3000);
/* Reset the switch. */
ar7240sw_reg_write(mii, AR7240_REG_MASK_CTRL,
reset_mask &= ~(AR71XX_RESET_GE0_PHY | AR71XX_RESET_GE1_PHY);
ath79_device_reset_set(reset_phy);
- mdelay(50);
+ msleep(50);
ath79_device_reset_clear(reset_phy);
- mdelay(200);
+ msleep(200);
}
ag71xx_sb(ag, AG71XX_REG_MAC_CFG1, MAC_CFG1_SR);
udelay(20);
ath79_device_reset_set(reset_mask);
- mdelay(100);
+ msleep(100);
ath79_device_reset_clear(reset_mask);
- mdelay(200);
+ msleep(200);
ag71xx_hw_setup(ag);