sky2: Replace mdelay with msleep in sky2_vpd_wait
authorJia-Ju Bai <baijiaju1990@gmail.com>
Sun, 24 Dec 2017 03:54:33 +0000 (11:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jan 2018 17:27:33 +0000 (12:27 -0500)
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 <baijiaju1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/sky2.c

index 9efe1771423cdde9b7832042b61f3ac60b347123..9fe85300e7b69506e8766ad3562deaf750b86070 100644 (file)
@@ -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;