phy: phy_{read|write}_mmd_indirect: get addr from phydev
The address of the device can be determined from the phydev structure, rather than passing it as a parameter. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
04521bf840
commit
053e7e1692
@@ -78,10 +78,9 @@ static int lan88xx_probe(struct phy_device *phydev)
|
||||
priv->wolopts = 0;
|
||||
|
||||
/* these values can be used to identify internal PHY */
|
||||
priv->chip_id = phy_read_mmd_indirect(phydev, LAN88XX_MMD3_CHIP_ID,
|
||||
3, phydev->addr);
|
||||
priv->chip_id = phy_read_mmd_indirect(phydev, LAN88XX_MMD3_CHIP_ID, 3);
|
||||
priv->chip_rev = phy_read_mmd_indirect(phydev, LAN88XX_MMD3_CHIP_REV,
|
||||
3, phydev->addr);
|
||||
3);
|
||||
|
||||
phydev->priv = priv;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user