Skip to content

Commit

Permalink
net: phy: mdio-bcm-unimac: create unique bus names
Browse files Browse the repository at this point in the history
In preparation for having multiple GENET instances in a system (up to
3), make sure that we do include the bus instance number in the name of
the MDIO bus such that we change it from "unimac-mdio" to
"unimac-mdio-0" for instance.

So far, the only user of this driver is using Device Tree, which uses a
lookup/parenting based technique to map PHY devices to their respective
MDIO bus controllers, hence causing no additional changes.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Jul 31, 2017
1 parent 69a60b0 commit d782f7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/mdio-bcm-unimac.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static int unimac_mdio_probe(struct platform_device *pdev)
bus->read = unimac_mdio_read;
bus->write = unimac_mdio_write;
bus->reset = unimac_mdio_reset;
snprintf(bus->id, MII_BUS_ID_SIZE, "%s", pdev->name);
snprintf(bus->id, MII_BUS_ID_SIZE, "%s-%d", pdev->name, pdev->id);

ret = of_mdiobus_register(bus, np);
if (ret) {
Expand Down

0 comments on commit d782f7c

Please sign in to comment.