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

@@ -1033,7 +1033,7 @@ static int smsc911x_mii_probe(struct net_device *dev)
netdev_info(dev,
"attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
phydev->drv->name, phydev_name(phydev), phydev->irq);
/* mask with MAC supported features */
phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause |

View File

@@ -1167,7 +1167,7 @@ static int smsc9420_mii_probe(struct net_device *dev)
netif_info(pd, probe, pd->dev, "PHY addr %d, phy_id 0x%08X\n",
phydev->addr, phydev->phy_id);
phydev = phy_connect(dev, dev_name(&phydev->dev),
phydev = phy_connect(dev, phydev_name(phydev),
smsc9420_phy_adjust_link, PHY_INTERFACE_MODE_MII);
if (IS_ERR(phydev)) {
@@ -1176,7 +1176,7 @@ static int smsc9420_mii_probe(struct net_device *dev)
}
netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
phydev->drv->name, phydev_name(phydev), phydev->irq);
/* mask with MAC supported features */
phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause |