Commit 5707d5ffd42a45088f433a2514d1320a6491697b

Authored by Shengzhou Liu
Committed by Joe Hershberger
1 parent c6a40f6e51

net/phy: fixup for get_phy_id

commit 3c6928fd7b0f84 "net: phy: fix warnings with W=1" caused
some PHYs(e.g. CS4315/CS4340) not working. This patch fixes the
warning and make those special PHYs working as well.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>

Showing 2 changed files with 2 additions and 1 deletions Side-by-side Diff

drivers/net/phy/phy.c
... ... @@ -582,7 +582,7 @@
582 582 * Description: Reads the ID registers of the PHY at @addr on the
583 583 * @bus, stores it in @phy_id and returns zero on success.
584 584 */
585   -static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
  585 +int __weak get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
586 586 {
587 587 int phy_reg;
588 588  
... ... @@ -254,6 +254,7 @@
254 254 int phy_vitesse_init(void);
255 255  
256 256 int board_phy_config(struct phy_device *phydev);
  257 +int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id);
257 258  
258 259 /**
259 260 * phy_get_interface_by_name() - Look up a PHY interface name