[PATCH v2 25/46] net: ti: cpsw: Fix not calling dev_dbg with a device
Sean Anderson
seanga2 at gmail.com
Tue Sep 15 16:45:01 CEST 2020
Without DM_ETH, cpsw_priv.dev is an eth_device. Just use its name instead.
Signed-off-by: Sean Anderson <seanga2 at gmail.com>
---
Changes in v2:
- New
drivers/net/ti/cpsw.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
index d6fefe5306..1c11257839 100644
--- a/drivers/net/ti/cpsw.c
+++ b/drivers/net/ti/cpsw.c
@@ -856,8 +856,14 @@ static int cpsw_phy_init(struct cpsw_priv *priv, struct cpsw_slave *slave)
ret = phy_set_supported(phydev, slave->data->max_speed);
if (ret)
return ret;
+#if CONFIG_IS_ENABLED(DM_ETH)
dev_dbg(priv->dev, "Port %u speed forced to %uMbit\n",
slave->slave_num + 1, slave->data->max_speed);
+#else
+ log_debug("%s: Port %u speed forced to %uMbit\n",
+ priv->dev->name, slave->slave_num + 1,
+ slave->data->max_speed);
+#endif
}
phydev->advertising = phydev->supported;
--
2.28.0
More information about the U-Boot
mailing list