From 4d3248a29cb78b31bb0520eb99b4be620e810a40 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 11 Jan 2006 11:27:33 -0800 Subject: [PATCH] gianfar: Use new PHY_ID_FMT macro Make the driver produce the string used by phy_connect and have board specific code pass the integer mii bus id and phy device id for the specific controller instance. Signed-off-by: Kumar Gala Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- drivers/net/gianfar.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 637b73ad5e9..0c18dbd67d3 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -399,12 +399,15 @@ static int init_phy(struct net_device *dev) priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? SUPPORTED_1000baseT_Full : 0; struct phy_device *phydev; + char phy_id[BUS_ID_SIZE]; priv->oldlink = 0; priv->oldspeed = 0; priv->oldduplex = -1; - phydev = phy_connect(dev, priv->einfo->bus_id, &adjust_link, 0); + snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id); + + phydev = phy_connect(dev, phy_id, &adjust_link, 0); if (IS_ERR(phydev)) { printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); -- cgit v1.2.3