aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy_device.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2019-03-27 21:59:33 +0100
committerDavid S. Miller <davem@davemloft.net>2019-04-02 13:09:56 -0700
commit2a4d8674b8ec1fc0cf91a4d59b0ca119052036ce (patch)
tree92c4db8a538e7742910ebf9e1c5063e375ec0f6b /drivers/net/phy/phy_device.c
parentnet: phy: add genphy_read_abilities (diff)
downloadlinux-dev-2a4d8674b8ec1fc0cf91a4d59b0ca119052036ce.tar.xz
linux-dev-2a4d8674b8ec1fc0cf91a4d59b0ca119052036ce.zip
net: phy: use genphy_read_abilities in genphy driver
Currently the genphy driver populates phydev->supported like this: First all possible feature bits are set, then genphy_config_init() reads the available features from the chip and remove all unsupported features from phydev->supported. This can be simplified by using genphy_read_abilities(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r--drivers/net/phy/phy_device.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 0af66f32d363..67fc581e3598 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2284,8 +2284,7 @@ static struct phy_driver genphy_driver = {
.phy_id_mask = 0xffffffff,
.name = "Generic PHY",
.soft_reset = genphy_no_soft_reset,
- .config_init = genphy_config_init,
- .features = PHY_GBIT_ALL_PORTS_FEATURES,
+ .get_features = genphy_read_abilities,
.aneg_done = genphy_aneg_done,
.suspend = genphy_suspend,
.resume = genphy_resume,