diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-01-06 20:11:09 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-07 20:31:24 +0100 |
commit | 72ba48be3ec8e70937ad97d4420ef7144617c64b (patch) | |
tree | 6d23ff6974ae35e28d01b6199468ce5d6b0fcada /include | |
parent | phy: Use phy_read() instead of mdiobus_read() (diff) | |
download | linux-72ba48be3ec8e70937ad97d4420ef7144617c64b.tar.xz linux-72ba48be3ec8e70937ad97d4420ef7144617c64b.zip |
phy: Add phydev_err() and phydev_dbg() macros
In preparation for moving some of the phy_device structure members,
add macros for printing errors and debug information.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phy.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 8ca161a37e8a..dbcf9fdd960c 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -777,6 +777,12 @@ static inline int phy_read_status(struct phy_device *phydev) return phydev->drv->read_status(phydev); } +#define phydev_err(_phydev, format, args...) \ + dev_err(&_phydev->dev, format, ##args) + +#define phydev_dbg(_phydev, format, args...) \ + dev_dbg(&_phydev->dev, format, ##args) + int genphy_config_init(struct phy_device *phydev); int genphy_setup_forced(struct phy_device *phydev); int genphy_restart_aneg(struct phy_device *phydev); |