diff options
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.c')
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 34161bc5a02f..d20f02927f72 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -233,14 +233,7 @@ static int __init gfar_of_init(void) | |||
233 | goto err; | 233 | goto err; |
234 | } | 234 | } |
235 | 235 | ||
236 | mac_addr = get_property(np, "local-mac-address", NULL); | 236 | mac_addr = of_get_mac_address(np); |
237 | if (mac_addr == NULL) | ||
238 | mac_addr = get_property(np, "mac-address", NULL); | ||
239 | if (mac_addr == NULL) { | ||
240 | /* Obsolete */ | ||
241 | mac_addr = get_property(np, "address", NULL); | ||
242 | } | ||
243 | |||
244 | if (mac_addr) | 237 | if (mac_addr) |
245 | memcpy(gfar_data.mac_addr, mac_addr, 6); | 238 | memcpy(gfar_data.mac_addr, mac_addr, 6); |
246 | 239 | ||
@@ -646,8 +639,9 @@ static int __init fs_enet_of_init(void) | |||
646 | goto unreg; | 639 | goto unreg; |
647 | } | 640 | } |
648 | 641 | ||
649 | mac_addr = get_property(np, "mac-address", NULL); | 642 | mac_addr = of_get_mac_address(np); |
650 | memcpy(fs_enet_data.macaddr, mac_addr, 6); | 643 | if (mac_addr) |
644 | memcpy(fs_enet_data.macaddr, mac_addr, 6); | ||
651 | 645 | ||
652 | ph = get_property(np, "phy-handle", NULL); | 646 | ph = get_property(np, "phy-handle", NULL); |
653 | phy = of_find_node_by_phandle(*ph); | 647 | phy = of_find_node_by_phandle(*ph); |
@@ -931,8 +925,9 @@ static int __init fs_enet_of_init(void) | |||
931 | goto err; | 925 | goto err; |
932 | r[0].name = enet_regs; | 926 | r[0].name = enet_regs; |
933 | 927 | ||
934 | mac_addr = (void *)get_property(np, "mac-address", NULL); | 928 | mac_addr = of_get_mac_address(np); |
935 | memcpy(fs_enet_data.macaddr, mac_addr, 6); | 929 | if (mac_addr) |
930 | memcpy(fs_enet_data.macaddr, mac_addr, 6); | ||
936 | 931 | ||
937 | ph = (phandle *) get_property(np, "phy-handle", NULL); | 932 | ph = (phandle *) get_property(np, "phy-handle", NULL); |
938 | if (ph != NULL) | 933 | if (ph != NULL) |