]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/freescale/fec.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[karo-tx-linux.git] / drivers / net / ethernet / freescale / fec.c
index 51215e1507ddd8413b1e5e6f97e48c7da673fb32..29d82cf1528e237b874b0cbbb51a37d6ce0d254e 100644 (file)
@@ -1609,7 +1609,6 @@ static int fec_enet_init(struct net_device *ndev)
        }
 
        spin_lock_init(&fep->hw_lock);
-       spin_lock_init(&fep->tmreg_lock);
 
        fep->netdev = ndev;
 
@@ -1690,10 +1689,13 @@ static void fec_reset_phy(struct platform_device *pdev)
                msec = 1;
 
        phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0);
+       if (!gpio_is_valid(phy_reset))
+               return;
+
        err = devm_gpio_request_one(&pdev->dev, phy_reset,
                                    GPIOF_OUT_INIT_LOW, "phy-reset");
        if (err) {
-               pr_debug("FEC: failed to get gpio phy-reset: %d\n", err);
+               dev_err(&pdev->dev, "failed to get phy-reset-gpios: %d\n", err);
                return;
        }
        msleep(msec);
@@ -1841,6 +1843,9 @@ fec_probe(struct platform_device *pdev)
 
        fec_reset_phy(pdev);
 
+       if (fep->bufdesc_ex)
+               fec_ptp_init(ndev, pdev);
+
        ret = fec_enet_init(ndev);
        if (ret)
                goto failed_init;
@@ -1856,9 +1861,6 @@ fec_probe(struct platform_device *pdev)
        if (ret)
                goto failed_register;
 
-       if (fep->bufdesc_ex)
-               fec_ptp_init(ndev, pdev);
-
        return 0;
 
 failed_register: