From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH v2 net-next 2/2] net: phy: use phy_disable_interrupts in phy_stop
Date: Mon, 5 Mar 2018 22:34:46 +0100 [thread overview]
Message-ID: <b897b17f-34a8-bd24-0c12-03b368a08c75@gmail.com> (raw)
In-Reply-To: <7a212841-6499-18be-b646-33ea69fb7da2@gmail.com>
Now that phy_disable_interrupts() can't take lock phydev->lock any longer,
we can use it to simplify phy_stop().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/phy.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index c5aa773ea..c2d9027be 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -765,13 +765,8 @@ void phy_stop(struct phy_device *phydev)
if (PHY_HALTED == phydev->state)
goto out_unlock;
- if (phy_interrupt_is_valid(phydev)) {
- /* Disable PHY Interrupts */
- phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED);
-
- /* Clear any pending interrupts */
- phy_clear_interrupt(phydev);
- }
+ if (phy_interrupt_is_valid(phydev))
+ phy_disable_interrupts(phydev);
phydev->state = PHY_HALTED;
--
2.16.2
next prev parent reply other threads:[~2018-03-05 21:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-05 21:29 [PATCH v2 net-next 0/2] net: phy: remove phy_error from phy_disable_interrupts Heiner Kallweit
2018-03-05 21:34 ` [PATCH v2 net-next 1/2] " Heiner Kallweit
2018-03-06 16:59 ` Andrew Lunn
2018-03-05 21:34 ` Heiner Kallweit [this message]
2018-03-06 16:59 ` [PATCH v2 net-next 2/2] net: phy: use phy_disable_interrupts in phy_stop Andrew Lunn
2018-03-07 17:30 ` [PATCH v2 net-next 0/2] net: phy: remove phy_error from phy_disable_interrupts 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=b897b17f-34a8-bd24-0c12-03b368a08c75@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
/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).