[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 <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

authored by Kumar Gala and committed by Jeff Garzik 4d3248a2 a4d00f17

+6 -2
+4 -1
drivers/net/gianfar.c
··· 399 priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? 400 SUPPORTED_1000baseT_Full : 0; 401 struct phy_device *phydev; 402 403 priv->oldlink = 0; 404 priv->oldspeed = 0; 405 priv->oldduplex = -1; 406 407 - phydev = phy_connect(dev, priv->einfo->bus_id, &adjust_link, 0); 408 409 if (IS_ERR(phydev)) { 410 printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
··· 399 priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? 400 SUPPORTED_1000baseT_Full : 0; 401 struct phy_device *phydev; 402 + char phy_id[BUS_ID_SIZE]; 403 404 priv->oldlink = 0; 405 priv->oldspeed = 0; 406 priv->oldduplex = -1; 407 408 + snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id); 409 + 410 + phydev = phy_connect(dev, phy_id, &adjust_link, 0); 411 412 if (IS_ERR(phydev)) { 413 printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
+2 -1
include/linux/fsl_devices.h
··· 50 51 /* board specific information */ 52 u32 board_flags; 53 - const char *bus_id; 54 u8 mac_addr[6]; 55 }; 56
··· 50 51 /* board specific information */ 52 u32 board_flags; 53 + u32 bus_id; 54 + u32 phy_id; 55 u8 mac_addr[6]; 56 }; 57