net: phy: add helpers phy_(un)lock_mdio_bus
Add helpers to make locking/unlocking the MDIO bus easier. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
4eb47198e9
commit
bec170e559
@@ -1076,6 +1076,16 @@ static inline const char *phydev_name(const struct phy_device *phydev)
|
||||
return dev_name(&phydev->mdio.dev);
|
||||
}
|
||||
|
||||
static inline void phy_lock_mdio_bus(struct phy_device *phydev)
|
||||
{
|
||||
mutex_lock(&phydev->mdio.bus->mdio_lock);
|
||||
}
|
||||
|
||||
static inline void phy_unlock_mdio_bus(struct phy_device *phydev)
|
||||
{
|
||||
mutex_unlock(&phydev->mdio.bus->mdio_lock);
|
||||
}
|
||||
|
||||
void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
|
||||
__printf(2, 3);
|
||||
void phy_attached_info(struct phy_device *phydev);
|
||||
|
Reference in New Issue
Block a user