summaryrefslogtreecommitdiffstats
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-01-06 20:11:09 +0100
committerDavid S. Miller <davem@davemloft.net>2016-01-07 14:31:24 -0500
commit72ba48be3ec8e70937ad97d4420ef7144617c64b (patch)
tree6d23ff6974ae35e28d01b6199468ce5d6b0fcada /include/linux/phy.h
parentcd690e48f567642e1c1a2b67e592010e6456082a (diff)
downloadop-kernel-dev-72ba48be3ec8e70937ad97d4420ef7144617c64b.zip
op-kernel-dev-72ba48be3ec8e70937ad97d4420ef7144617c64b.tar.gz
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/linux/phy.h')
-rw-r--r--include/linux/phy.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 8ca161a..dbcf9fd 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);
OpenPOWER on IntegriCloud