ethernet: use eth_hw_addr_set() instead of ether_addr_copy()
[linux-2.6-microblaze.git] / drivers / net / ethernet / socionext / netsec.c
index 1f46af1..c7e56dc 100644 (file)
@@ -1860,10 +1860,9 @@ static int netsec_of_probe(struct platform_device *pdev,
        *phy_addr = of_mdio_parse_addr(&pdev->dev, priv->phy_np);
 
        priv->clk = devm_clk_get(&pdev->dev, NULL); /* get by 'phy_ref_clk' */
-       if (IS_ERR(priv->clk)) {
-               dev_err(&pdev->dev, "phy_ref_clk not found\n");
-               return PTR_ERR(priv->clk);
-       }
+       if (IS_ERR(priv->clk))
+               return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk),
+                                    "phy_ref_clk not found\n");
        priv->freq = clk_get_rate(priv->clk);
 
        return 0;
@@ -1886,19 +1885,17 @@ static int netsec_acpi_probe(struct platform_device *pdev,
        priv->phy_interface = PHY_INTERFACE_MODE_NA;
 
        ret = device_property_read_u32(&pdev->dev, "phy-channel", phy_addr);
-       if (ret) {
-               dev_err(&pdev->dev,
-                       "missing required property 'phy-channel'\n");
-               return ret;
-       }
+       if (ret)
+               return dev_err_probe(&pdev->dev, ret,
+                                    "missing required property 'phy-channel'\n");
 
        ret = device_property_read_u32(&pdev->dev,
                                       "socionext,phy-clock-frequency",
                                       &priv->freq);
        if (ret)
-               dev_err(&pdev->dev,
-                       "missing required property 'socionext,phy-clock-frequency'\n");
-       return ret;
+               return dev_err_probe(&pdev->dev, ret,
+                                    "missing required property 'socionext,phy-clock-frequency'\n");
+       return 0;
 }
 
 static void netsec_unregister_mdio(struct netsec_priv *priv)
@@ -2039,7 +2036,7 @@ static int netsec_probe(struct platform_device *pdev)
 
        mac = device_get_mac_address(&pdev->dev, macbuf, sizeof(macbuf));
        if (mac)
-               ether_addr_copy(ndev->dev_addr, mac);
+               eth_hw_addr_set(ndev, mac);
 
        if (priv->eeprom_base &&
            (!mac || !is_valid_ether_addr(ndev->dev_addr))) {