]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: phy: use lock helpers
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Wed, 7 Jan 2026 06:52:12 +0000 (07:52 +0100)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 12 Jan 2026 02:44:48 +0000 (04:44 +0200)
No need to open code bus locking.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21435
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c

index d06ae0483607b011f7ec455458a2e2ab4f9973a1..b6d2aba00f30b4bc048b3d1ba63edb397f45c7bd 100644 (file)
@@ -453,12 +453,11 @@ static bool __rtl8214fc_media_is_fibre(struct phy_device *phydev)
 
 static bool rtl8214fc_media_is_fibre(struct phy_device *phydev)
 {
-       struct mii_bus *bus = phydev->mdio.bus;
        int ret;
 
-       mutex_lock(&bus->mdio_lock);
+       phy_lock_mdio_bus(phydev);
        ret = __rtl8214fc_media_is_fibre(phydev);
-       mutex_unlock(&bus->mdio_lock);
+       phy_unlock_mdio_bus(phydev);
 
        return ret;
 }