History

net: phy: add helpers phy_(un)lock_mdio_bus

Add helpers to make locking/unlocking the MDIO bus easier.

Heiner Kallweit committed 6 years ago

Commit bec170e1 parent 4eb47192 files · +24 −14Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/phy.h+10−0
@@ -1076,6 +1076,16 @@ static inline const char *phydev_name(const struct phy_device *phydev) · 1075 unmodified lines
1076 return dev_name(&phydev->mdio.dev);1076 return dev_name(&phydev->mdio.dev);
1077}1077}
1078 1078
1079static inline void phy_lock_mdio_bus(struct phy_device *phydev)
1080{
1081 mutex_lock(&phydev->mdio.bus->mdio_lock);
1082}
1083
1084static inline void phy_unlock_mdio_bus(struct phy_device *phydev)
1085{
1086 mutex_unlock(&phydev->mdio.bus->mdio_lock);
1087}
1088
1079void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)1089void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
1080 __printf(2, 3);1090 __printf(2, 3);
1081void phy_attached_info(struct phy_device *phydev);1091void phy_attached_info(struct phy_device *phydev);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t