Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135464
b: refs/heads/master
c: 18f2738
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and David S. Miller committed Mar 23, 2009
1 parent 368704f commit 5cf658e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e303dc1215714308e21a45e2c0fa6f701ad0eb4
refs/heads/master: 18f27383d9bdcb985cc39599e99917bdad101a60
10 changes: 7 additions & 3 deletions trunk/drivers/net/fsl_pq_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,15 @@ static int *create_irq_map(struct device_node *np)

void fsl_pq_mdio_bus_name(char *name, struct device_node *np)
{
const u32 *reg;
const u32 *addr;
u64 taddr = OF_BAD_ADDR;

reg = of_get_property(np, "reg", NULL);
addr = of_get_address(np, 0, NULL, NULL);
if (addr)
taddr = of_translate_address(np, addr);

snprintf(name, MII_BUS_ID_SIZE, "%s@%x", np->name, reg ? *reg : 0);
snprintf(name, MII_BUS_ID_SIZE, "%s@%llx", np->name,
(unsigned long long)taddr);
}

/* Scan the bus in reverse, looking for an empty spot */
Expand Down

0 comments on commit 5cf658e

Please sign in to comment.