mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-01-06 14:45:37 +00:00
generic: ar8216: move ar8xxx_id_chip into ar8xxx_phy_probe
ar8xxx_id_chip is used to determine current ar8xxx_chip using switch id and this isn't needed during mdiodev probing. Move it out of ar8xxx_probe_switch so that we can skip it. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
This commit is contained in:
parent
ebec6c9f85
commit
da64a8c656
@ -1975,10 +1975,6 @@ ar8xxx_probe_switch(struct ar8xxx_priv *priv)
|
|||||||
struct switch_dev *swdev;
|
struct switch_dev *swdev;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = ar8xxx_id_chip(priv);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
chip = priv->chip;
|
chip = priv->chip;
|
||||||
|
|
||||||
swdev = &priv->dev;
|
swdev = &priv->dev;
|
||||||
@ -2208,6 +2204,10 @@ ar8xxx_phy_probe(struct phy_device *phydev)
|
|||||||
priv->mii_bus = phydev->mdio.bus;
|
priv->mii_bus = phydev->mdio.bus;
|
||||||
priv->pdev = &phydev->mdio.dev;
|
priv->pdev = &phydev->mdio.dev;
|
||||||
|
|
||||||
|
ret = ar8xxx_id_chip(priv);
|
||||||
|
if (ret)
|
||||||
|
goto free_priv;
|
||||||
|
|
||||||
ret = ar8xxx_probe_switch(priv);
|
ret = ar8xxx_probe_switch(priv);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto free_priv;
|
goto free_priv;
|
||||||
|
Loading…
Reference in New Issue
Block a user