aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-02-11 16:11:31 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-02-11 16:11:31 +0000
commit9c86d268ebe0f83eb24f331bfb29834e8045332a (patch)
tree9a59726fb1ec2aa485f180b5cb7301abcc297ae6 /target/linux
parent3f3eba88f61b7384e5308e6af07820a7650257c3 (diff)
downloadupstream-9c86d268ebe0f83eb24f331bfb29834e8045332a.tar.gz
upstream-9c86d268ebe0f83eb24f331bfb29834e8045332a.tar.bz2
upstream-9c86d268ebe0f83eb24f331bfb29834e8045332a.zip
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> SVN-Revision: 35560
Diffstat (limited to 'target/linux')
-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 baf752bf11..b1791172e0 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;