You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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:
committed by
David S. Miller
parent
72ba48be3e
commit
84eff6d194
@@ -372,7 +372,7 @@ static int ax_mii_probe(struct net_device *dev)
|
||||
ax->phy_dev = phy_dev;
|
||||
|
||||
netdev_info(dev, "PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
|
||||
phy_dev->drv->name, dev_name(&phy_dev->dev), phy_dev->irq);
|
||||
phy_dev->drv->name, phydev_name(phy_dev), phy_dev->irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ static int mii_probe(struct net_device *dev, int phy_mode)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
phydev = phy_connect(dev, dev_name(&phydev->dev),
|
||||
phydev = phy_connect(dev, phydev_name(phydev),
|
||||
&bfin_mac_adjust_link, phy_mode);
|
||||
|
||||
if (IS_ERR(phydev)) {
|
||||
@@ -446,7 +446,7 @@ static int mii_probe(struct net_device *dev, int phy_mode)
|
||||
|
||||
pr_info("attached PHY driver [%s] "
|
||||
"(mii_bus:phy_addr=%s, irq=%d, mdc_clk=%dHz(mdc_div=%d)@sclk=%dMHz)\n",
|
||||
phydev->drv->name, dev_name(&phydev->dev), phydev->irq,
|
||||
phydev->drv->name, phydev_name(phydev), phydev->irq,
|
||||
MDC_CLK, mdc_div, sclk/1000000);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -3265,7 +3265,7 @@ static int et131x_mii_probe(struct net_device *netdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
phydev = phy_connect(netdev, dev_name(&phydev->dev),
|
||||
phydev = phy_connect(netdev, phydev_name(phydev),
|
||||
&et131x_adjust_link, PHY_INTERFACE_MODE_MII);
|
||||
|
||||
if (IS_ERR(phydev)) {
|
||||
@@ -3291,7 +3291,7 @@ static int et131x_mii_probe(struct net_device *netdev)
|
||||
|
||||
dev_info(&adapter->pdev->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;
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ static int au1000_mii_probe(struct net_device *dev)
|
||||
/* now we are supposed to have a proper phydev, to attach to... */
|
||||
BUG_ON(phydev->attached_dev);
|
||||
|
||||
phydev = phy_connect(dev, dev_name(&phydev->dev),
|
||||
phydev = phy_connect(dev, phydev_name(phydev),
|
||||
&au1000_adjust_link, PHY_INTERFACE_MODE_MII);
|
||||
|
||||
if (IS_ERR(phydev)) {
|
||||
@@ -585,7 +585,7 @@ static int au1000_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);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -2951,7 +2951,7 @@ static int macb_probe(struct platform_device *pdev)
|
||||
|
||||
phydev = bp->phy_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);
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -274,11 +274,11 @@ static int dnet_mii_probe(struct net_device *dev)
|
||||
|
||||
/* attach the mac to the phy */
|
||||
if (bp->capabilities & DNET_HAS_RMII) {
|
||||
phydev = phy_connect(dev, dev_name(&phydev->dev),
|
||||
phydev = phy_connect(dev, phydev_name(phydev),
|
||||
&dnet_handle_link_change,
|
||||
PHY_INTERFACE_MODE_RMII);
|
||||
} else {
|
||||
phydev = phy_connect(dev, dev_name(&phydev->dev),
|
||||
phydev = phy_connect(dev, phydev_name(phydev),
|
||||
&dnet_handle_link_change,
|
||||
PHY_INTERFACE_MODE_MII);
|
||||
}
|
||||
@@ -894,7 +894,7 @@ static int dnet_probe(struct platform_device *pdev)
|
||||
phydev = bp->phy_dev;
|
||||
dev_info(&pdev->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);
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -854,7 +854,7 @@ static int ftgmac100_mii_probe(struct ftgmac100 *priv)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
phydev = phy_connect(netdev, dev_name(&phydev->dev),
|
||||
phydev = phy_connect(netdev, phydev_name(phydev),
|
||||
&ftgmac100_adjust_link, PHY_INTERFACE_MODE_GMII);
|
||||
|
||||
if (IS_ERR(phydev)) {
|
||||
|
||||
@@ -390,7 +390,7 @@ ltq_etop_mdio_probe(struct net_device *dev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
phydev = phy_connect(dev, dev_name(&phydev->dev),
|
||||
phydev = phy_connect(dev, phydev_name(phydev),
|
||||
<q_etop_mdio_link, priv->pldata->mii_mode);
|
||||
|
||||
if (IS_ERR(phydev)) {
|
||||
@@ -410,7 +410,7 @@ ltq_etop_mdio_probe(struct net_device *dev)
|
||||
priv->phydev = phydev;
|
||||
pr_info("%s: attached PHY [%s] (phy_addr=%s, irq=%d)\n",
|
||||
dev->name, phydev->drv->name,
|
||||
dev_name(&phydev->dev), phydev->irq);
|
||||
phydev_name(phydev), phydev->irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -797,7 +797,7 @@ static int lpc_mii_probe(struct net_device *ndev)
|
||||
netdev_info(ndev, "using MII interface\n");
|
||||
else
|
||||
netdev_info(ndev, "using RMII interface\n");
|
||||
phydev = phy_connect(ndev, dev_name(&phydev->dev),
|
||||
phydev = phy_connect(ndev, phydev_name(phydev),
|
||||
&lpc_handle_link_change,
|
||||
lpc_phy_interface_mode(&pldat->pdev->dev));
|
||||
|
||||
@@ -818,7 +818,7 @@ static int lpc_mii_probe(struct net_device *ndev)
|
||||
|
||||
netdev_info(ndev,
|
||||
"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);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1039,7 +1039,7 @@ static int r6040_mii_probe(struct net_device *dev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
phydev = phy_connect(dev, dev_name(&phydev->dev), &r6040_adjust_link,
|
||||
phydev = phy_connect(dev, phydev_name(phydev), &r6040_adjust_link,
|
||||
PHY_INTERFACE_MODE_MII);
|
||||
|
||||
if (IS_ERR(phydev)) {
|
||||
@@ -1063,7 +1063,7 @@ static int r6040_mii_probe(struct net_device *dev)
|
||||
|
||||
dev_info(&lp->pdev->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;
|
||||
}
|
||||
|
||||
@@ -928,7 +928,7 @@ static int ravb_phy_init(struct net_device *ndev)
|
||||
phydev->supported &= ~PHY_10BT_FEATURES;
|
||||
|
||||
netdev_info(ndev, "attached PHY %d (IRQ %d) to driver %s\n",
|
||||
phydev->addr, phydev->irq, phydev->drv->name);
|
||||
phydev->addr, phydev->irq, phydev_name(phydev));
|
||||
|
||||
priv->phydev = phydev;
|
||||
|
||||
|
||||
@@ -1827,7 +1827,7 @@ static int sh_eth_phy_init(struct net_device *ndev)
|
||||
}
|
||||
|
||||
netdev_info(ndev, "attached PHY %d (IRQ %d) to driver %s\n",
|
||||
phydev->addr, phydev->irq, phydev->drv->name);
|
||||
phydev->addr, phydev->irq, phydev_name(phydev));
|
||||
|
||||
mdp->phydev = phydev;
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ int sxgbe_mdio_register(struct net_device *ndev)
|
||||
}
|
||||
netdev_info(ndev, "PHY ID %08x at %d IRQ %s (%s)%s\n",
|
||||
phy->phy_id, phy_addr, irq_str,
|
||||
dev_name(&phy->dev), act ? " active" : "");
|
||||
phydev_name(phy), act ? " active" : "");
|
||||
phy_found = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -298,7 +298,7 @@ int stmmac_mdio_register(struct net_device *ndev)
|
||||
}
|
||||
pr_info("%s: PHY ID %08x at %d IRQ %s (%s)%s\n",
|
||||
ndev->name, phydev->phy_id, addr,
|
||||
irq_str, dev_name(&phydev->dev),
|
||||
irq_str, phydev_name(phydev),
|
||||
act ? " active" : "");
|
||||
found = 1;
|
||||
}
|
||||
|
||||
@@ -1646,7 +1646,7 @@ static int emac_dev_open(struct net_device *ndev)
|
||||
|
||||
dev_info(emac_dev, "attached PHY driver [%s] "
|
||||
"(mii_bus:phy_addr=%s, id=%x)\n",
|
||||
priv->phydev->drv->name, dev_name(&priv->phydev->dev),
|
||||
priv->phydev->drv->name, phydev_name(priv->phydev),
|
||||
priv->phydev->phy_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@ static int davinci_mdio_probe(struct platform_device *pdev)
|
||||
phy = data->bus->phy_map[addr];
|
||||
if (phy) {
|
||||
dev_info(dev, "phy[%d]: device %s, driver %s\n",
|
||||
phy->addr, dev_name(&phy->dev),
|
||||
phy->addr, phydev_name(phy),
|
||||
phy->drv ? phy->drv->name : "unknown");
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user