pasemi_mac: Use local-mac-address instead of mac-address if available

Use local-mac-address in the device tree instead. Fall back to mac-address
for older firmware.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Olof Johansson 2007-05-08 00:48:02 -05:00 коммит произвёл Jeff Garzik
Родитель bb6e959079
Коммит a5fd22ebc7
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -94,7 +94,12 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac)
return -ENOENT; return -ENOENT;
} }
maddr = get_property(dn, "mac-address", NULL); maddr = get_property(dn, "local-mac-address", NULL);
/* Fall back to mac-address for older firmware */
if (maddr == NULL)
maddr = get_property(dn, "mac-address", NULL);
if (maddr == NULL) { if (maddr == NULL) {
dev_warn(&pdev->dev, dev_warn(&pdev->dev,
"no mac address in device tree, not configuring\n"); "no mac address in device tree, not configuring\n");