lkml.org 
[lkml]   [2023]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[net-next PATCH] net: phy: at803x: replace msleep(1) with usleep_range
Date
Replace msleep(1) with usleep_range as suggested by timers-howto guide.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/net/phy/at803x.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index a7d28848ee93..2b2f0fadaf84 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -916,9 +916,9 @@ static void at803x_link_change_notify(struct phy_device *phydev)
at803x_context_save(phydev, &context);

phy_device_reset(phydev, 1);
- msleep(1);
+ usleep_range(1000, 2000);
phy_device_reset(phydev, 0);
- msleep(1);
+ usleep_range(1000, 2000);

at803x_context_restore(phydev, &context);

@@ -1733,7 +1733,7 @@ static int qca83xx_resume(struct phy_device *phydev)
if (ret)
return ret;

- msleep(1);
+ usleep_range(1000, 2000);

return 0;
}
--
2.40.1

\
 
 \ /
  Last update: 2023-12-18 00:26    [W:0.047 / U:1.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site