net: dsa: lan9303: Replace msleep(1) with usleep_range()

Remove scripts/checkpatch.pl WARNING by replacing msleep(1) with usleep_range()

Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Egil Hjelmeland 2017-11-06 12:42:03 +01:00 committed by David S. Miller
parent 68d50fa494
commit ec5c91c6ca
1 changed files with 2 additions and 2 deletions

View File

@ -284,7 +284,7 @@ static int lan9303_indirect_phy_wait_for_completion(struct lan9303 *chip)
}
if (!(reg & LAN9303_PMI_ACCESS_MII_BUSY))
return 0;
msleep(1);
usleep_range(1000, 2000);
}
return -EIO;
@ -376,7 +376,7 @@ static int lan9303_switch_wait_for_completion(struct lan9303 *chip)
}
if (!(reg & LAN9303_SWITCH_CSR_CMD_BUSY))
return 0;
msleep(1);
usleep_range(1000, 2000);
}
return -EIO;