aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy_device.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2021-01-06 14:03:40 +0100
committerJakub Kicinski <kuba@kernel.org>2021-01-07 14:53:07 -0800
commite6e918d4eb93f43e770fbc2a0881686e350e1a1f (patch)
tree773a30cbea9d815d5faf396340272b2449b3c61f /drivers/net/phy/phy_device.c
parentnet: phy: bcm7xxx: Add an entry for BCM72116 (diff)
downloadlinux-dev-e6e918d4eb93f43e770fbc2a0881686e350e1a1f.tar.xz
linux-dev-e6e918d4eb93f43e770fbc2a0881686e350e1a1f.zip
net: phy: replace mutex_is_locked with lockdep_assert_held in phylib
Switch to lockdep_assert_held(_once), similar to what is being done in other subsystems. One advantage is that there's zero runtime overhead if lockdep support isn't enabled. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/ccc40b9d-8ee0-43a1-5009-2cc95ca79c85@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r--drivers/net/phy/phy_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 80c2e646c093..8447e56ba572 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1740,7 +1740,7 @@ int __phy_resume(struct phy_device *phydev)
struct phy_driver *phydrv = phydev->drv;
int ret;
- WARN_ON(!mutex_is_locked(&phydev->lock));
+ lockdep_assert_held(&phydev->lock);
if (!phydrv || !phydrv->resume)
return 0;