]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
net/phy: fixup for get_phy_id
authorShengzhou Liu <Shengzhou.Liu@freescale.com>
Tue, 7 Apr 2015 10:46:32 +0000 (18:46 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:29:19 +0000 (22:29 +0200)
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 049c45b28017924718016b41d09820ed4e5a82a6..9e6bca3f6f50734ba63e4f616009c0a0bc7b96a1 100644 (file)
@@ -699,7 +699,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 384dc2321e541278409b3c67f4e9677b306c5973..3f826b66f71feb995832572bdc5bad2ccd27066c 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