[target] stay coherent when defining ARCH
[openwrt.git] / target / linux / ar71xx / files / drivers / net / ag71xx / ag71xx_phy.c
index 547f72e..4233152 100644 (file)
@@ -309,9 +309,11 @@ int ag71xx_phy_connect(struct ag71xx *ag)
        }
 
        /* Reset the mdio bus explicitly */
-       mutex_lock(&ag->mii_bus->mdio_lock);
-       ag->mii_bus->reset(ag->mii_bus);
-       mutex_unlock(&ag->mii_bus->mdio_lock);
+       if (ag->mii_bus->reset) {
+               mutex_lock(&ag->mii_bus->mdio_lock);
+               ag->mii_bus->reset(ag->mii_bus);
+               mutex_unlock(&ag->mii_bus->mdio_lock);
+       }
 
        if (pdata->phy_mask)
                return ag71xx_phy_connect_multi(ag);
This page took 0.021678 seconds and 4 git commands to generate.