Skip to content

Commit ec5c91c

Browse files
hjelmelanddavem330
authored andcommitted
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>
1 parent 68d50fa commit ec5c91c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/dsa/lan9303-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static int lan9303_indirect_phy_wait_for_completion(struct lan9303 *chip)
284284
}
285285
if (!(reg & LAN9303_PMI_ACCESS_MII_BUSY))
286286
return 0;
287-
msleep(1);
287+
usleep_range(1000, 2000);
288288
}
289289

290290
return -EIO;
@@ -376,7 +376,7 @@ static int lan9303_switch_wait_for_completion(struct lan9303 *chip)
376376
}
377377
if (!(reg & LAN9303_SWITCH_CSR_CMD_BUSY))
378378
return 0;
379-
msleep(1);
379+
usleep_range(1000, 2000);
380380
}
381381

382382
return -EIO;

0 commit comments

Comments
 (0)