Skip to content

Commit

Permalink
linux/phy.h: add phydev_err_probe() wrapper for dev_err_probe()
Browse files Browse the repository at this point in the history
The dev_err_probe() function is quite useful to avoid boilerplate
related to -EPROBE_DEFER handling. Add a phydev_err_probe() helper to
simplify making use of that from phy drivers which otherwise use the
phydev_* helpers.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Rasmus Villemoes authored and Jakub Kicinski committed Jun 17, 2022
1 parent ab1e9de commit a793679
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/linux/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,9 @@ static inline void phy_device_reset(struct phy_device *phydev, int value)
#define phydev_err(_phydev, format, args...) \
dev_err(&_phydev->mdio.dev, format, ##args)

#define phydev_err_probe(_phydev, err, format, args...) \
dev_err_probe(&_phydev->mdio.dev, err, format, ##args)

#define phydev_info(_phydev, format, args...) \
dev_info(&_phydev->mdio.dev, format, ##args)

Expand Down

0 comments on commit a793679

Please sign in to comment.