net/phy: fixup for get_phy_id
authorShengzhou Liu <Shengzhou.Liu@freescale.com>
Tue, 7 Apr 2015 10:46:32 +0000 (18:46 +0800)
committerJoe Hershberger <joe.hershberger@ni.com>
Mon, 20 Apr 2015 22:57:13 +0000 (17:57 -0500)
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>
drivers/net/phy/phy.c
include/phy.h

index 9d88afe..f5221a3 100644 (file)
@@ -582,7 +582,7 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
  * Description: Reads the ID registers of the PHY at @addr on the
  *   @bus, stores it in @phy_id and returns zero on success.
  */
-static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
+int __weak get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
 {
        int phy_reg;
 
index 384dc23..3f826b6 100644 (file)
@@ -254,6 +254,7 @@ int phy_teranetics_init(void);
 int phy_vitesse_init(void);
 
 int board_phy_config(struct phy_device *phydev);
+int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id);
 
 /**
  * phy_get_interface_by_name() - Look up a PHY interface name