phy: add phydev_name() wrapper

Add a phydev_name() function, to help with moving some structure members
from phy_device.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andrew Lunn
2016-01-06 20:11:10 +01:00
committed by David S. Miller
parent 72ba48be3e
commit 84eff6d194
26 changed files with 44 additions and 39 deletions

View File

@@ -2316,7 +2316,7 @@ static int b44_register_phy_one(struct b44 *bp)
bp->phy_addr = phydev->addr;
dev_info(sdev->dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s)\n",
phydev->drv->name, dev_name(&phydev->dev));
phydev->drv->name, phydev_name(phydev));
return 0;

View File

@@ -2096,7 +2096,7 @@ static int tg3_phy_init(struct tg3 *tp)
phydev = tp->mdio_bus->phy_map[tp->phy_addr];
/* Attach the MAC to the PHY. */
phydev = phy_connect(tp->dev, dev_name(&phydev->dev),
phydev = phy_connect(tp->dev, phydev_name(phydev),
tg3_adjust_link, phydev->interface);
if (IS_ERR(phydev)) {
dev_err(&tp->pdev->dev, "Could not attach to PHY\n");
@@ -17903,7 +17903,7 @@ static int tg3_init_one(struct pci_dev *pdev,
phydev = tp->mdio_bus->phy_map[tp->phy_addr];
netdev_info(dev,
"attached PHY driver [%s] (mii_bus:phy_addr=%s)\n",
phydev->drv->name, dev_name(&phydev->dev));
phydev->drv->name, phydev_name(phydev));
} else {
char *ethtype;