diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-03-01 16:08:55 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-01 21:23:34 -0500 |
commit | 6ed33d3a06e6ded784a9fe2780b33d6cd2ba2df7 (patch) | |
tree | 393dcb6114772b61b34ed60be7853beb924b9a3d /drivers/net/phy | |
parent | 5697b3e1445387e5fa190a4e6833e3f7da43c3f2 (diff) |
net: phy: aquantia: Utilize genphy_c45_aneg_done()
The driver duplicates what the generic function does, so use the generic
function intead.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/aquantia.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index e8ae50e1255e..319edc9c8ec7 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -38,14 +38,6 @@ static int aquantia_config_aneg(struct phy_device *phydev) return 0; } -static int aquantia_aneg_done(struct phy_device *phydev) -{ - int reg; - - reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); - return (reg < 0) ? reg : (reg & BMSR_ANEGCOMPLETE); -} - static int aquantia_config_intr(struct phy_device *phydev) { int err; @@ -125,7 +117,7 @@ static struct phy_driver aquantia_driver[] = { .name = "Aquantia AQ1202", .features = PHY_AQUANTIA_FEATURES, .flags = PHY_HAS_INTERRUPT, - .aneg_done = aquantia_aneg_done, + .aneg_done = genphy_c45_aneg_done, .config_aneg = aquantia_config_aneg, .config_intr = aquantia_config_intr, .ack_interrupt = aquantia_ack_interrupt, @@ -137,7 +129,7 @@ static struct phy_driver aquantia_driver[] = { .name = "Aquantia AQ2104", .features = PHY_AQUANTIA_FEATURES, .flags = PHY_HAS_INTERRUPT, - .aneg_done = aquantia_aneg_done, + .aneg_done = genphy_c45_aneg_done, .config_aneg = aquantia_config_aneg, .config_intr = aquantia_config_intr, .ack_interrupt = aquantia_ack_interrupt, @@ -149,7 +141,7 @@ static struct phy_driver aquantia_driver[] = { .name = "Aquantia AQR105", .features = PHY_AQUANTIA_FEATURES, .flags = PHY_HAS_INTERRUPT, - .aneg_done = aquantia_aneg_done, + .aneg_done = genphy_c45_aneg_done, .config_aneg = aquantia_config_aneg, .config_intr = aquantia_config_intr, .ack_interrupt = aquantia_ack_interrupt, @@ -161,7 +153,7 @@ static struct phy_driver aquantia_driver[] = { .name = "Aquantia AQR106", .features = PHY_AQUANTIA_FEATURES, .flags = PHY_HAS_INTERRUPT, - .aneg_done = aquantia_aneg_done, + .aneg_done = genphy_c45_aneg_done, .config_aneg = aquantia_config_aneg, .config_intr = aquantia_config_intr, .ack_interrupt = aquantia_ack_interrupt, @@ -173,7 +165,7 @@ static struct phy_driver aquantia_driver[] = { .name = "Aquantia AQR107", .features = PHY_AQUANTIA_FEATURES, .flags = PHY_HAS_INTERRUPT, - .aneg_done = aquantia_aneg_done, + .aneg_done = genphy_c45_aneg_done, .config_aneg = aquantia_config_aneg, .config_intr = aquantia_config_intr, .ack_interrupt = aquantia_ack_interrupt, @@ -185,7 +177,7 @@ static struct phy_driver aquantia_driver[] = { .name = "Aquantia AQR405", .features = PHY_AQUANTIA_FEATURES, .flags = PHY_HAS_INTERRUPT, - .aneg_done = aquantia_aneg_done, + .aneg_done = genphy_c45_aneg_done, .config_aneg = aquantia_config_aneg, .config_intr = aquantia_config_intr, .ack_interrupt = aquantia_ack_interrupt, |