提交 143d81dc 编写于 作者: S Sean Anderson 提交者: Tom Rini

net: ti: cpsw: Fix not calling dev_dbg with a device

Without DM_ETH, cpsw_priv.dev is an eth_device. Just use its name instead.
Signed-off-by: NSean Anderson <seanga2@gmail.com>
Tested-by: NPatrick Delaunay <patrick.delaunay@st.com>
上级 ef043693
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册