From: Jia-Ju Bai Date: Sun, 24 Dec 2017 03:54:33 +0000 (+0800) Subject: sky2: Replace mdelay with msleep in sky2_vpd_wait X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=75ce7191eac5972405d1752a991bc002c2957b65;p=openwrt%2Fstaging%2Fblogic.git sky2: Replace mdelay with msleep in sky2_vpd_wait sky2_vpd_wait is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with msleep, to reduce busy wait. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 9efe1771423c..9fe85300e7b6 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -4287,7 +4287,7 @@ static int sky2_vpd_wait(const struct sky2_hw *hw, int cap, u16 busy) dev_err(&hw->pdev->dev, "VPD cycle timed out\n"); return -ETIMEDOUT; } - mdelay(1); + msleep(1); } return 0;