浏览代码

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>
Shengzhou Liu 10 年之前
父节点
当前提交
5707d5ffd4
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      drivers/net/phy/phy.c
  2. 1 0
      include/phy.h

+ 1 - 1
drivers/net/phy/phy.c

@@ -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;
 

+ 1 - 0
include/phy.h

@@ -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