diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/miiphyutil.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/miiphyutil.c b/common/miiphyutil.c index aca18db..8eb0f76 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -107,6 +107,18 @@ int mdio_register(struct mii_dev *bus) return 0; } +int mdio_register_seq(struct mii_dev *bus, int seq) +{ + int ret; + + /* Setup a unique name for each mdio bus */ + ret = snprintf(bus->name, MDIO_NAME_LEN, "eth%d", seq); + if (ret < 0) + return ret; + + return mdio_register(bus); +} + int mdio_unregister(struct mii_dev *bus) { if (!bus) |