From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, andrew@lunn.ch,
vivien.didelot@savoirfairelinux.com,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net-next 1/2] net: dsa: loop: Inline unregister_fixed_phys()
Date: Thu, 15 Jun 2017 10:15:52 -0700 [thread overview]
Message-ID: <20170615171553.16482-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20170615171553.16482-1-f.fainelli@gmail.com>
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>
---
drivers/net/dsa/dsa_loop.c | 15 +++++----------
1 file 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 = {
#define NUM_FIXED_PHYS (DSA_LOOP_NUM_PORTS - 2)
-static void unregister_fixed_phys(void)
-{
- unsigned int i;
-
- for (i = 0; i < NUM_FIXED_PHYS; i++)
- if (phydevs[i])
- fixed_phy_unregister(phydevs[i]);
-}
-
static int __init dsa_loop_init(void)
{
struct fixed_phy_status status = {
@@ -320,8 +311,12 @@ module_init(dsa_loop_init);
static void __exit dsa_loop_exit(void)
{
+ unsigned int i;
+
mdio_driver_unregister(&dsa_loop_drv);
- unregister_fixed_phys();
+ for (i = 0; i < NUM_FIXED_PHYS; i++)
+ if (phydevs[i])
+ fixed_phy_unregister(phydevs[i]);
}
module_exit(dsa_loop_exit);
--
2.9.3
next prev parent reply other threads:[~2017-06-15 17:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-15 17:15 [PATCH net-next 0/2] net: dsa: loop: Driver updates Florian Fainelli
2017-06-15 17:15 ` Florian Fainelli [this message]
2017-06-15 17:15 ` [PATCH net-next 2/2] net: dsa: loop: Implement ethtool statistics Florian Fainelli
2017-06-16 16:44 ` [PATCH net-next 0/2] net: dsa: loop: Driver updates David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170615171553.16482-2-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).