diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-06-15 13:15:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-16 12:43:48 -0400 |
commit | 3407dc8ed1a7528e8792c86d9ebc124aa5fa629f (patch) | |
tree | c7c522784f4f3831e8718e2b00afd2c3bf7d18a5 /drivers/net/dsa/dsa_loop.c | |
parent | 5f881503a43da76a60dd556af1a871cadb411816 (diff) |
net: dsa: loop: Inline unregister_fixed_phys()
This is a simple function that only gets used in the driver's remove
function, inline it there.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
-rw-r--r-- | drivers/net/dsa/dsa_loop.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c index 79e62593ff4e..fb888593c2e9 100644 --- a/drivers/net/dsa/dsa_loop.c +++ b/drivers/net/dsa/dsa_loop.c | |||
@@ -293,15 +293,6 @@ static struct mdio_driver dsa_loop_drv = { | |||
293 | 293 | ||
294 | #define NUM_FIXED_PHYS (DSA_LOOP_NUM_PORTS - 2) | 294 | #define NUM_FIXED_PHYS (DSA_LOOP_NUM_PORTS - 2) |
295 | 295 | ||
296 | static void unregister_fixed_phys(void) | ||
297 | { | ||
298 | unsigned int i; | ||
299 | |||
300 | for (i = 0; i < NUM_FIXED_PHYS; i++) | ||
301 | if (phydevs[i]) | ||
302 | fixed_phy_unregister(phydevs[i]); | ||
303 | } | ||
304 | |||
305 | static int __init dsa_loop_init(void) | 296 | static int __init dsa_loop_init(void) |
306 | { | 297 | { |
307 | struct fixed_phy_status status = { | 298 | struct fixed_phy_status status = { |
@@ -320,8 +311,12 @@ module_init(dsa_loop_init); | |||
320 | 311 | ||
321 | static void __exit dsa_loop_exit(void) | 312 | static void __exit dsa_loop_exit(void) |
322 | { | 313 | { |
314 | unsigned int i; | ||
315 | |||
323 | mdio_driver_unregister(&dsa_loop_drv); | 316 | mdio_driver_unregister(&dsa_loop_drv); |
324 | unregister_fixed_phys(); | 317 | for (i = 0; i < NUM_FIXED_PHYS; i++) |
318 | if (phydevs[i]) | ||
319 | fixed_phy_unregister(phydevs[i]); | ||
325 | } | 320 | } |
326 | module_exit(dsa_loop_exit); | 321 | module_exit(dsa_loop_exit); |
327 | 322 | ||