summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-02-11 16:11:31 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-02-11 16:11:31 +0000
commit38d421179ae10e82c6fb7dc235c2231bb2d1c264 (patch)
tree3b7ee050d5a65d1a51f1b948151d1c7eddbd1ee8
parent39c34fd7b3bd275cff53e1ea536af940d00fe940 (diff)
generic: ar8216: don't use ethernet device name in register_switch
The switches are accessed via an MDIO bus. Set the alias to the name of the MDIO bus, and show that in the message along with the name of the switch switch device. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35560 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index baf752bf1..b1791172e 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1885,12 +1885,13 @@ ar8216_config_init(struct phy_device *phydev)
}
swdev = &priv->dev;
- ret = register_switch(swdev, phydev->attached_dev);
+ swdev->alias = dev_name(&priv->mii_bus->dev);
+ ret = register_switch(swdev, NULL);
if (ret)
goto err;
- pr_info("%s: %s switch driver attached.\n",
- phydev->attached_dev->name, swdev->name);
+ pr_info("%s: %s switch registered on %s\n",
+ swdev->devname, swdev->name, dev_name(&priv->mii_bus->dev));
priv->init = true;