diff options
author | Johannes Zink <j.zink@pengutronix.de> | 2023-05-09 08:05:21 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-05-22 13:29:47 +0200 |
commit | 0c1dd8fda791d029d89e27a3b4e96a5129b40fae (patch) | |
tree | 47416a02b6a981ed095b746081638800d990a590 /drivers | |
parent | ad236f691de196167a0b1deea28a64ffc51fc08f (diff) | |
download | barebox-0c1dd8fda791d029d89e27a3b4e96a5129b40fae.tar.gz barebox-0c1dd8fda791d029d89e27a3b4e96a5129b40fae.tar.xz |
net: phy: print error messages to log
Previously the phy core did just print info and error messages to
console, but they did not show up in the system log.
Now the dev_info and dev_err macros are used instead of raw puts,
they are now nicely formatted and show up in the log.
Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
Link: https://lore.barebox.org/20230509060521.707205-1-j.zink@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 54dbbca725..dbc30b66b8 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -462,7 +462,7 @@ int phy_device_connect(struct eth_device *edev, struct mii_bus *bus, int addr, ret = -ENODEV; out: if (ret) - puts("Unable to find a PHY (unknown ID?)\n"); + dev_err(&edev->dev, "Unable to find a PHY (unknown ID?)\n"); return ret; } @@ -675,7 +675,7 @@ int genphy_aneg_done(struct phy_device *phydev) /* Restart auto-negotiation if remote fault */ if (bmsr & BMSR_RFAULT) { - puts("PHY remote fault detected\n" + dev_info(&phydev->dev, "PHY remote fault detected\n" "PHY restarting auto-negotiation\n"); phy_write(phydev, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART); |