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>
Šī revīzija ir iekļauta:
Andy Fleming
2008-04-09 19:38:13 -05:00
revīziju iesūtīja Jeff Garzik
vecāks d080cd6301
revīzija 9d9326d3bc
21 mainīti faili ar 36 papildinājumiem un 32 dzēšanām

Parādīt failu

@@ -341,7 +341,7 @@ static int __init gfar_of_init(void)
goto unreg;
}
gfar_data.bus_id = 0;
snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "0");
gfar_data.phy_id = fixed_link[0];
} else {
phy = of_find_node_by_phandle(*ph);
@@ -362,7 +362,8 @@ static int __init gfar_of_init(void)
}
gfar_data.phy_id = *id;
gfar_data.bus_id = res.start;
snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "%x",
res.start);
of_node_put(phy);
of_node_put(mdio);