diff options
author | Chuanhong Guo <gch981213@gmail.com> | 2019-01-10 14:54:56 +0800 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-03-24 01:44:25 +0100 |
commit | da64a8c65630388369fc3ea600f1b09cc5364f13 (patch) | |
tree | dc05bccd06ac503371a6f485aa8915325026591b /target/linux/generic/files/drivers | |
parent | ebec6c9f857618b0f4a115fa095c5822396a7582 (diff) | |
download | upstream-da64a8c65630388369fc3ea600f1b09cc5364f13.tar.gz upstream-da64a8c65630388369fc3ea600f1b09cc5364f13.tar.bz2 upstream-da64a8c65630388369fc3ea600f1b09cc5364f13.zip |
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>
Diffstat (limited to 'target/linux/generic/files/drivers')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 10bdf52353..b8cc2c8f4c 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -1975,10 +1975,6 @@ ar8xxx_probe_switch(struct ar8xxx_priv *priv) struct switch_dev *swdev; int ret; - ret = ar8xxx_id_chip(priv); - if (ret) - return ret; - chip = priv->chip; swdev = &priv->dev; @@ -2208,6 +2204,10 @@ ar8xxx_phy_probe(struct phy_device *phydev) priv->mii_bus = phydev->mdio.bus; priv->pdev = &phydev->mdio.dev; + ret = ar8xxx_id_chip(priv); + if (ret) + goto free_priv; + ret = ar8xxx_probe_switch(priv); if (ret) goto free_priv; |