realtek: phy: use lock helpers

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>
This commit is contained in:
Markus Stockhausen 2026-01-07 07:52:12 +01:00 committed by Stijn Tintel
parent 9b1b5a6aec
commit b209174c43

View 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;
}