Commit d297c31fd101473983c17734a7e8a3752da1880f
1 parent
49345103fe
Exists in
master
and in
7 other branches
[TULIP]: Use pci_device_to_OF_node() on sparc.
Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 7 additions and 11 deletions Side-by-side Diff
drivers/net/tulip/tulip_core.c
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | #include <asm/uaccess.h> |
38 | 38 | |
39 | 39 | #ifdef CONFIG_SPARC |
40 | -#include <asm/pbm.h> | |
40 | +#include <asm/prom.h> | |
41 | 41 | #endif |
42 | 42 | |
43 | 43 | static char version[] __devinitdata = |
44 | 44 | |
... | ... | @@ -1536,22 +1536,18 @@ |
1536 | 1536 | that here as well. */ |
1537 | 1537 | if (sum == 0 || sum == 6*0xff) { |
1538 | 1538 | #if defined(CONFIG_SPARC) |
1539 | - struct pcidev_cookie *pcp = pdev->sysdata; | |
1539 | + struct device_node *dp = pci_device_to_OF_node(pdev); | |
1540 | + const unsigned char *addr; | |
1541 | + int len; | |
1540 | 1542 | #endif |
1541 | 1543 | eeprom_missing = 1; |
1542 | 1544 | for (i = 0; i < 5; i++) |
1543 | 1545 | dev->dev_addr[i] = last_phys_addr[i]; |
1544 | 1546 | dev->dev_addr[i] = last_phys_addr[i] + 1; |
1545 | 1547 | #if defined(CONFIG_SPARC) |
1546 | - if (pcp) { | |
1547 | - const unsigned char *addr; | |
1548 | - int len; | |
1549 | - | |
1550 | - addr = of_get_property(pcp->prom_node, | |
1551 | - "local-mac-address", &len); | |
1552 | - if (addr && len == 6) | |
1553 | - memcpy(dev->dev_addr, addr, 6); | |
1554 | - } | |
1548 | + addr = of_get_property(dp, "local-mac-address", &len); | |
1549 | + if (addr && len == 6) | |
1550 | + memcpy(dev->dev_addr, addr, 6); | |
1555 | 1551 | #endif |
1556 | 1552 | #if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ |
1557 | 1553 | if (last_irq) |