diff options
author | Sean Wang <sean.wang@mediatek.com> | 2016-09-22 16:36:15 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-22 08:22:27 -0400 |
commit | a2b2a19f0fbc674478a6806ea9e4f6aff06763f8 (patch) | |
tree | 73296512c7dc421208a6184573a2b02e1bba7648 /drivers/net/ethernet/mediatek | |
parent | 2364c5c5ec14e936826eb10af56a337ccec01ffa (diff) | |
download | linux-a2b2a19f0fbc674478a6806ea9e4f6aff06763f8.tar.gz linux-a2b2a19f0fbc674478a6806ea9e4f6aff06763f8.tar.bz2 linux-a2b2a19f0fbc674478a6806ea9e4f6aff06763f8.zip |
net: ethernet: mediatek: remove superfluous local variable for phy address
remove the unused variable for parsing PHY address
and the related logic for sanity test which would
be all already handled done when of_mdiobus_register
was called
Reported-by: Nelson Chang <nelson.chang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mediatek')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_eth_soc.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 6b7acf4463fa..1918c39bbd40 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -226,17 +226,9 @@ static void mtk_phy_link_adjust(struct net_device *dev) static int mtk_phy_connect_node(struct mtk_eth *eth, struct mtk_mac *mac, struct device_node *phy_node) { - const __be32 *_addr = NULL; struct phy_device *phydev; - int phy_mode, addr; + int phy_mode; - _addr = of_get_property(phy_node, "reg", NULL); - - if (!_addr || (be32_to_cpu(*_addr) >= 0x20)) { - pr_err("%s: invalid phy address\n", phy_node->name); - return -EINVAL; - } - addr = be32_to_cpu(*_addr); phy_mode = of_get_phy_mode(phy_node); if (phy_mode < 0) { dev_err(eth->dev, "incorrect phy-mode %d\n", phy_mode); |