diff options
author | Jonas Karlman <jonas@kwiboo.se> | 2023-08-31 22:16:38 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-09-13 15:52:20 -0400 |
commit | 8ec228b62b4546376757492bf6fbd9607e97b98e (patch) | |
tree | 44900e42486ebe105bb550f6cb9cb4600f7b4af6 | |
parent | 017ae4920ba71badb6ec92184fc0b529b7153fc5 (diff) |
net: zynq: Use generic_phy_valid() helper
The documentation for struct phy state that "The content of the
structure is managed solely by the PHY API and PHY drivers".
Change to use the generic_phy_valid() helper to check if phy is valid.
Fixes: 10c50b1facbf ("net: zynq: Add support for PHY configuration in SGMII mode")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
-rw-r--r-- | drivers/net/zynq_gem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index f3cdfb0275d..3377e669f2f 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -890,7 +890,8 @@ static int zynq_gem_probe(struct udevice *dev) if (ret) goto err3; - if (priv->interface == PHY_INTERFACE_MODE_SGMII && phy.dev) { + if (priv->interface == PHY_INTERFACE_MODE_SGMII && + generic_phy_valid(&phy)) { if (IS_ENABLED(CONFIG_DM_ETH_PHY)) { if (device_is_compatible(dev, "cdns,zynqmp-gem") || device_is_compatible(dev, "xlnx,zynqmp-gem")) { |