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
10761076 return dev_name(&phydev->mdio.dev);
10771077 }
10781078
1079+static inline void phy_lock_mdio_bus(struct phy_device *phydev)
1080+{
1081+ mutex_lock(&phydev->mdio.bus->mdio_lock);
1082+}
1083+
1084+static inline void phy_unlock_mdio_bus(struct phy_device *phydev)
1085+{
1086+ mutex_unlock(&phydev->mdio.bus->mdio_lock);
1087+}
1088+
10791089 void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
10801090 __printf(2, 3);
10811091 void 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