mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
phy: Change mii_bus id field to a string
Having the id field be an int was making more complex bus topologies excessively difficult. For now, just convert it to a string, and change all instances of "bus->id = val" to snprintf(id, MII_BUS_ID_LEN, "%x", val). Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
d080cd6301
commit
9d9326d3bc
21 changed files with 36 additions and 32 deletions
|
@ -1178,7 +1178,7 @@ static int __devinit find_phy(struct device_node *np,
|
|||
|
||||
data = of_get_property(np, "fixed-link", NULL);
|
||||
if (data) {
|
||||
snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data);
|
||||
snprintf(fpi->bus_id, 16, "%x:%02x", 0, *data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1202,7 +1202,7 @@ static int __devinit find_phy(struct device_node *np,
|
|||
if (!data || len != 4)
|
||||
goto out_put_mdio;
|
||||
|
||||
snprintf(fpi->bus_id, 16, PHY_ID_FMT, res.start, *data);
|
||||
snprintf(fpi->bus_id, 16, "%x:%02x", res.start, *data);
|
||||
|
||||
out_put_mdio:
|
||||
of_node_put(mdionode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue