diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-03-01 19:08:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-01 21:23:34 -0500 |
commit | 6ed33d3a06e6ded784a9fe2780b33d6cd2ba2df7 (patch) | |
tree | 393dcb6114772b61b34ed60be7853beb924b9a3d | |
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>
-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) | |||
38 | return 0; | 38 | return 0; |
39 | } | 39 | } |
40 | 40 | ||
41 | static int aquantia_aneg_done(struct phy_device *phydev) | ||
42 | { | ||
43 | int reg; | ||
44 | |||
45 | reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); | ||
46 | return (reg < 0) ? reg : (reg & BMSR_ANEGCOMPLETE); | ||
47 | } | ||
48 | |||
49 | static int aquantia_config_intr(struct phy_device *phydev) | 41 | static int aquantia_config_intr(struct phy_device *phydev) |
50 | { | 42 | { |
51 | int err; | 43 | int err; |
@@ -125,7 +117,7 @@ static struct phy_driver aquantia_driver[] = { | |||
125 | .name = "Aquantia AQ1202", | 117 | .name = "Aquantia AQ1202", |
126 | .features = PHY_AQUANTIA_FEATURES, | 118 | .features = PHY_AQUANTIA_FEATURES, |
127 | .flags = PHY_HAS_INTERRUPT, | 119 | .flags = PHY_HAS_INTERRUPT, |
128 | .aneg_done = aquantia_aneg_done, | 120 | .aneg_done = genphy_c45_aneg_done, |
129 | .config_aneg = aquantia_config_aneg, | 121 | .config_aneg = aquantia_config_aneg, |
130 | .config_intr = aquantia_config_intr, | 122 | .config_intr = aquantia_config_intr, |
131 | .ack_interrupt = aquantia_ack_interrupt, | 123 | .ack_interrupt = aquantia_ack_interrupt, |
@@ -137,7 +129,7 @@ static struct phy_driver aquantia_driver[] = { | |||
137 | .name = "Aquantia AQ2104", | 129 | .name = "Aquantia AQ2104", |
138 | .features = PHY_AQUANTIA_FEATURES, | 130 | .features = PHY_AQUANTIA_FEATURES, |
139 | .flags = PHY_HAS_INTERRUPT, | 131 | .flags = PHY_HAS_INTERRUPT, |
140 | .aneg_done = aquantia_aneg_done, | 132 | .aneg_done = genphy_c45_aneg_done, |
141 | .config_aneg = aquantia_config_aneg, | 133 | .config_aneg = aquantia_config_aneg, |
142 | .config_intr = aquantia_config_intr, | 134 | .config_intr = aquantia_config_intr, |
143 | .ack_interrupt = aquantia_ack_interrupt, | 135 | .ack_interrupt = aquantia_ack_interrupt, |
@@ -149,7 +141,7 @@ static struct phy_driver aquantia_driver[] = { | |||
149 | .name = "Aquantia AQR105", | 141 | .name = "Aquantia AQR105", |
150 | .features = PHY_AQUANTIA_FEATURES, | 142 | .features = PHY_AQUANTIA_FEATURES, |
151 | .flags = PHY_HAS_INTERRUPT, | 143 | .flags = PHY_HAS_INTERRUPT, |
152 | .aneg_done = aquantia_aneg_done, | 144 | .aneg_done = genphy_c45_aneg_done, |
153 | .config_aneg = aquantia_config_aneg, | 145 | .config_aneg = aquantia_config_aneg, |
154 | .config_intr = aquantia_config_intr, | 146 | .config_intr = aquantia_config_intr, |
155 | .ack_interrupt = aquantia_ack_interrupt, | 147 | .ack_interrupt = aquantia_ack_interrupt, |
@@ -161,7 +153,7 @@ static struct phy_driver aquantia_driver[] = { | |||
161 | .name = "Aquantia AQR106", | 153 | .name = "Aquantia AQR106", |
162 | .features = PHY_AQUANTIA_FEATURES, | 154 | .features = PHY_AQUANTIA_FEATURES, |
163 | .flags = PHY_HAS_INTERRUPT, | 155 | .flags = PHY_HAS_INTERRUPT, |
164 | .aneg_done = aquantia_aneg_done, | 156 | .aneg_done = genphy_c45_aneg_done, |
165 | .config_aneg = aquantia_config_aneg, | 157 | .config_aneg = aquantia_config_aneg, |
166 | .config_intr = aquantia_config_intr, | 158 | .config_intr = aquantia_config_intr, |
167 | .ack_interrupt = aquantia_ack_interrupt, | 159 | .ack_interrupt = aquantia_ack_interrupt, |
@@ -173,7 +165,7 @@ static struct phy_driver aquantia_driver[] = { | |||
173 | .name = "Aquantia AQR107", | 165 | .name = "Aquantia AQR107", |
174 | .features = PHY_AQUANTIA_FEATURES, | 166 | .features = PHY_AQUANTIA_FEATURES, |
175 | .flags = PHY_HAS_INTERRUPT, | 167 | .flags = PHY_HAS_INTERRUPT, |
176 | .aneg_done = aquantia_aneg_done, | 168 | .aneg_done = genphy_c45_aneg_done, |
177 | .config_aneg = aquantia_config_aneg, | 169 | .config_aneg = aquantia_config_aneg, |
178 | .config_intr = aquantia_config_intr, | 170 | .config_intr = aquantia_config_intr, |
179 | .ack_interrupt = aquantia_ack_interrupt, | 171 | .ack_interrupt = aquantia_ack_interrupt, |
@@ -185,7 +177,7 @@ static struct phy_driver aquantia_driver[] = { | |||
185 | .name = "Aquantia AQR405", | 177 | .name = "Aquantia AQR405", |
186 | .features = PHY_AQUANTIA_FEATURES, | 178 | .features = PHY_AQUANTIA_FEATURES, |
187 | .flags = PHY_HAS_INTERRUPT, | 179 | .flags = PHY_HAS_INTERRUPT, |
188 | .aneg_done = aquantia_aneg_done, | 180 | .aneg_done = genphy_c45_aneg_done, |
189 | .config_aneg = aquantia_config_aneg, | 181 | .config_aneg = aquantia_config_aneg, |
190 | .config_intr = aquantia_config_intr, | 182 | .config_intr = aquantia_config_intr, |
191 | .ack_interrupt = aquantia_ack_interrupt, | 183 | .ack_interrupt = aquantia_ack_interrupt, |