aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers/net
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-12-17 15:12:52 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-12-17 15:12:52 +0000
commit0cc622966d1bc4a3382ab968600ec78133a267a7 (patch)
tree373fc116423091d2c95fa0cbb2bc66303c643c38 /target/linux/ar71xx/files/drivers/net
parentbfbdffe87647a3d3bc49864f4a126c88a5b72ba3 (diff)
downloadupstream-0cc622966d1bc4a3382ab968600ec78133a267a7.tar.gz
upstream-0cc622966d1bc4a3382ab968600ec78133a267a7.tar.bz2
upstream-0cc622966d1bc4a3382ab968600ec78133a267a7.zip
ar71xx: ag71xx: use mdio bus name in ar7240_probe messages
The ar7240_probe function uses the network device name in the kernel log messages, however the name is not yet initialized when the ar7240_probe function is called. Use the mdio bus name in the messages to avoid ugly log lines like the following one: eth%d: Found an AR7240/AR9330 built-in switch Reported-by: Ronald Wahl <ronald.wahl@raritan.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39116 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c
index 9a51f786f9..3fa6cca36a 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c
@@ -1043,7 +1043,7 @@ static struct ar7240sw *ar7240_probe(struct ag71xx *ag)
if ((phy_id1 != AR7240_PHY_ID1 || phy_id2 != AR7240_PHY_ID2) &&
(phy_id1 != AR934X_PHY_ID1 || phy_id2 != AR934X_PHY_ID2)) {
pr_err("%s: unknown phy id '%04x:%04x'\n",
- ag->dev->name, phy_id1, phy_id2);
+ dev_name(&mii->dev), phy_id1, phy_id2);
return NULL;
}
@@ -1074,7 +1074,7 @@ static struct ar7240sw *ar7240_probe(struct ag71xx *ag)
AR934X_OPER_MODE0_PHY_MII_EN);
} else {
pr_err("%s: invalid PHY interface mode\n",
- ag->dev->name);
+ dev_name(&mii->dev));
goto err_free;
}
@@ -1087,7 +1087,7 @@ static struct ar7240sw *ar7240_probe(struct ag71xx *ag)
}
} else {
pr_err("%s: unsupported chip, ctrl=%08x\n",
- ag->dev->name, ctrl);
+ dev_name(&mii->dev), ctrl);
goto err_free;
}
@@ -1098,7 +1098,7 @@ static struct ar7240sw *ar7240_probe(struct ag71xx *ag)
if (register_switch(&as->swdev, ag->dev) < 0)
goto err_free;
- pr_info("%s: Found an %s\n", ag->dev->name, swdev->name);
+ pr_info("%s: Found an %s\n", dev_name(&mii->dev), swdev->name);
/* initialize defaults */
for (i = 0; i < AR7240_MAX_VLANS; i++)