提交 e9eb70c9 编写于 作者: T Timur Tabi 提交者: Jeff Garzik

ucc_geth: use of_get_mac_address()

Update ucc_geth_probe() to use function of_get_mac_address() to obtain the MAC
address.
Signed-off-by: NTimur Tabi <timur@freescale.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 f19841f5
...@@ -4199,9 +4199,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ...@@ -4199,9 +4199,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
ugeth->ug_info = ug_info; ugeth->ug_info = ug_info;
ugeth->dev = dev; ugeth->dev = dev;
mac_addr = get_property(np, "mac-address", NULL); mac_addr = of_get_mac_address(np);
if (mac_addr == NULL)
mac_addr = get_property(np, "local-mac-address", NULL);
if (mac_addr) if (mac_addr)
memcpy(dev->dev_addr, mac_addr, 6); memcpy(dev->dev_addr, mac_addr, 6);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册