bcmgenet, sun8i_emac: Don't connect PHY two times

The bcmgenet and sun8i_emac drivers call phy_connect(), which finds /
creates the PHY and also connects it to the eth device via
phy_connect_dev(), then set some phydev members (bcmgenet only), and
then call phy_connect_dev() explicitly again.

Drop the second phy_connect_dev(), since it is unnecesary.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
Marek Behún 2022-04-07 00:33:07 +02:00 committed by Ramon Fried
parent 79bef5fb1f
commit b638814e91
2 changed files with 0 additions and 4 deletions

View File

@ -526,8 +526,6 @@ static int bcmgenet_phy_init(struct bcmgenet_eth_priv *priv, void *dev)
}
phydev->advertising = phydev->supported;
phy_connect_dev(phydev, dev);
priv->phydev = phydev;
phy_config(priv->phydev);

View File

@ -391,8 +391,6 @@ static int sun8i_phy_init(struct emac_eth_dev *priv, void *dev)
if (!phydev)
return -ENODEV;
phy_connect_dev(phydev, dev);
priv->phydev = phydev;
phy_config(priv->phydev);