mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 05:39:46 +01:00
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:
parent
9b1b5a6aec
commit
b209174c43
1 changed files with 2 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue