]> err.no Git - linux-2.6/blobdiff - drivers/net/phy/phy_device.c
Fix a lock problem in generic phy code
[linux-2.6] / drivers / net / phy / phy_device.c
index e275df8c55bc64d2168ee62c0a946baf1fd4a6d2..49328e0505055c554b5236839d72c1423c14d868 100644 (file)
@@ -644,7 +644,7 @@ static int phy_probe(struct device *dev)
        if (!(phydrv->flags & PHY_HAS_INTERRUPT))
                phydev->irq = PHY_POLL;
 
-       spin_lock(&phydev->lock);
+       spin_lock_bh(&phydev->lock);
 
        /* Start out supporting everything. Eventually,
         * a controller will attach, and may modify one
@@ -658,7 +658,7 @@ static int phy_probe(struct device *dev)
        if (phydev->drv->probe)
                err = phydev->drv->probe(phydev);
 
-       spin_unlock(&phydev->lock);
+       spin_unlock_bh(&phydev->lock);
 
        return err;