From: Markus Stockhausen Date: Wed, 7 Jan 2026 06:52:12 +0000 (+0100) Subject: realtek: phy: use lock helpers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b209174c43bc0b6a4cb6f4af44a1b25d85d543c6;p=thirdparty%2Fopenwrt.git realtek: phy: use lock helpers No need to open code bus locking. Signed-off-by: Markus Stockhausen Link: https://github.com/openwrt/openwrt/pull/21435 Signed-off-by: Stijn Tintel --- diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c index d06ae048360..b6d2aba00f3 100644 --- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c +++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c @@ -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; }