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>
SVN-Revision: 39116
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",
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);
AR934X_OPER_MODE0_PHY_MII_EN);
} else {
pr_err("%s: invalid PHY interface mode\n",
AR934X_OPER_MODE0_PHY_MII_EN);
} else {
pr_err("%s: invalid PHY interface mode\n",
}
} else {
pr_err("%s: unsupported chip, ctrl=%08x\n",
}
} else {
pr_err("%s: unsupported chip, ctrl=%08x\n",
+ dev_name(&mii->dev), ctrl);
if (register_switch(&as->swdev, ag->dev) < 0)
goto err_free;
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++)
/* initialize defaults */
for (i = 0; i < AR7240_MAX_VLANS; i++)