]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: ti: cpsw: Fix not calling dev_dbg with a device
authorSean Anderson <seanga2@gmail.com>
Tue, 15 Sep 2020 14:45:01 +0000 (10:45 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 30 Sep 2020 12:53:26 +0000 (08:53 -0400)
Without DM_ETH, cpsw_priv.dev is an eth_device. Just use its name instead.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
drivers/net/ti/cpsw.c

index d6fefe530688d21ff98e3810e93a217b4cd39079..1c11257839cfcebf3e738911b35c6429ead62cf3 100644 (file)
@@ -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;