From: Marek Vasut <marex@denx.de>
To: netdev@vger.kernel.org
Cc: Marek Vasut <marex@denx.de>,
"David S . Miller" <davem@davemloft.net>,
Nisar Sayed <Nisar.Sayed@microchip.com>,
Woojung Huh <Woojung.Huh@microchip.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
linux-usb@vger.kernel.org
Subject: [PATCH 05/19] usbnet: smsc95xx: Remove smsc95xx_{read,write}_nopm()
Date: Thu, 3 Jan 2019 02:10:26 +0100 [thread overview]
Message-ID: <20190103011040.25974-6-marex@denx.de> (raw)
In-Reply-To: <20190103011040.25974-1-marex@denx.de>
These functions are now equal to smsc95xx_mdio_{read,write}(),
deduplicate them.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nisar Sayed <Nisar.Sayed@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-usb@vger.kernel.org
To: netdev@vger.kernel.org
---
drivers/net/usb/smsc95xx.c | 30 +++++++++---------------------
1 file changed, 9 insertions(+), 21 deletions(-)
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 6c48fec2e5b5..1ab7e6fa6d7a 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -252,18 +252,6 @@ static void __smsc95xx_mdio_write(struct net_device *netdev, int phy_id,
mutex_unlock(&dev->phy_mutex);
}
-static int smsc95xx_mdio_read_nopm(struct net_device *netdev, int phy_id,
- int idx)
-{
- return __smsc95xx_mdio_read(netdev, phy_id, idx);
-}
-
-static void smsc95xx_mdio_write_nopm(struct net_device *netdev, int phy_id,
- int idx, int regval)
-{
- __smsc95xx_mdio_write(netdev, phy_id, idx, regval);
-}
-
static int smsc95xx_mdio_read(struct net_device *netdev, int phy_id, int idx)
{
return __smsc95xx_mdio_read(netdev, phy_id, idx);
@@ -1340,18 +1328,18 @@ static int smsc95xx_enable_phy_wakeup_interrupts(struct usbnet *dev, u16 mask)
netdev_dbg(dev->net, "enabling PHY wakeup interrupts\n");
/* read to clear */
- ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, PHY_INT_SRC);
+ ret = smsc95xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC);
if (ret < 0)
return ret;
/* enable interrupt source */
- ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, PHY_INT_MASK);
+ ret = smsc95xx_mdio_read(dev->net, mii->phy_id, PHY_INT_MASK);
if (ret < 0)
return ret;
ret |= mask;
- smsc95xx_mdio_write_nopm(dev->net, mii->phy_id, PHY_INT_MASK, ret);
+ smsc95xx_mdio_write(dev->net, mii->phy_id, PHY_INT_MASK, ret);
return 0;
}
@@ -1362,11 +1350,11 @@ static int smsc95xx_link_ok_nopm(struct usbnet *dev)
int ret;
/* first, a dummy read, needed to latch some MII phys */
- ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR);
+ ret = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_BMSR);
if (ret < 0)
return ret;
- ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, MII_BMSR);
+ ret = smsc95xx_mdio_read(dev->net, mii->phy_id, MII_BMSR);
if (ret < 0)
return ret;
@@ -1423,17 +1411,17 @@ static int smsc95xx_enter_suspend1(struct usbnet *dev)
* compatibility with non-standard link partners
*/
if (pdata->features & FEATURE_PHY_NLP_CROSSOVER)
- smsc95xx_mdio_write_nopm(dev->net, mii->phy_id, PHY_EDPD_CONFIG,
- PHY_EDPD_CONFIG_DEFAULT);
+ smsc95xx_mdio_write(dev->net, mii->phy_id, PHY_EDPD_CONFIG,
+ PHY_EDPD_CONFIG_DEFAULT);
/* enable energy detect power-down mode */
- ret = smsc95xx_mdio_read_nopm(dev->net, mii->phy_id, PHY_MODE_CTRL_STS);
+ ret = smsc95xx_mdio_read(dev->net, mii->phy_id, PHY_MODE_CTRL_STS);
if (ret < 0)
return ret;
ret |= MODE_CTRL_STS_EDPWRDOWN_;
- smsc95xx_mdio_write_nopm(dev->net, mii->phy_id, PHY_MODE_CTRL_STS, ret);
+ smsc95xx_mdio_write(dev->net, mii->phy_id, PHY_MODE_CTRL_STS, ret);
/* enter SUSPEND1 mode */
ret = smsc95xx_read_reg(dev, PM_CTRL, &val);
--
2.19.2
next prev parent reply other threads:[~2019-01-03 1:11 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 1:10 [PATCH 00/19] usbnet: smsc95xx: Convert to phydev Marek Vasut
2019-01-03 1:10 ` [PATCH 01/19] usbnet: smsc95xx: Fix memory leak in smsc95xx_bind Marek Vasut
2019-01-03 1:10 ` [PATCH 02/19] usbnet: smsc95xx: Stop propagation of in_pm Marek Vasut
2019-01-07 11:02 ` Oliver Neukum
2019-01-07 11:50 ` Marek Vasut
2019-01-03 1:10 ` [PATCH 03/19] usbnet: smsc95xx: Remove smsc95xx_{read,write}_reg_nopm() Marek Vasut
2019-01-03 1:10 ` [PATCH 04/19] usbnet: smsc95xx: Remove __smsc95xx_{read,write}_reg() Marek Vasut
2019-01-03 1:10 ` Marek Vasut [this message]
2019-01-03 1:10 ` [PATCH 06/19] usbnet: smsc95xx: Remove __smsc95xx_mdio_{read,write}() Marek Vasut
2019-01-03 1:10 ` [PATCH 07/19] usbnet: smsc95xx: Split the reset function Marek Vasut
2019-01-07 11:05 ` Oliver Neukum
2019-01-03 1:10 ` [PATCH 08/19] usbnet: smsc95xx: Register MII bus Marek Vasut
2019-01-03 1:10 ` [PATCH 09/19] usbnet: smsc95xx: Connect to phydev Marek Vasut
2019-01-03 13:22 ` Andrew Lunn
2019-01-04 2:18 ` Marek Vasut
2019-01-03 1:10 ` [PATCH 10/19] usbnet: smsc95xx: Replace smsc95xx_mdio_read() with phy_read() Marek Vasut
2019-01-03 13:39 ` Andrew Lunn
2019-01-04 2:19 ` Marek Vasut
2019-01-04 13:24 ` Andrew Lunn
2019-01-04 14:58 ` Marek Vasut
2019-01-04 15:57 ` Andrew Lunn
2019-01-04 18:02 ` Heiner Kallweit
2019-01-03 1:10 ` [PATCH 11/19] usbnet: smsc95xx: Replace smsc95xx_mdio_write() with phy_write() Marek Vasut
2019-01-03 1:10 ` [PATCH 12/19] usbnet: smsc95xx: Replace ad-hoc PHY functions with generic ones Marek Vasut
2019-01-03 13:28 ` Andrew Lunn
2019-01-04 2:19 ` Marek Vasut
2019-01-03 1:10 ` [PATCH 13/19] usbnet: smsc95xx: Replace smsc95xx_link_ok_nopm() Marek Vasut
2019-01-03 1:10 ` [PATCH 14/19] usbnet: smsc95xx: Replace mii_nway_restart() Marek Vasut
2019-01-03 1:10 ` [PATCH 15/19] usbnet: smsc95xx: Replace mii_ethtool_gset() Marek Vasut
2019-01-03 1:10 ` [PATCH 16/19] usbnet: smsc95xx: Replace mii_check_media() Marek Vasut
2019-01-03 1:10 ` [PATCH 17/19] usbnet: smsc95xx: Replace generic_mii_ioctl() Marek Vasut
2019-01-03 1:10 ` [PATCH 18/19] usbnet: smsc95xx: Remove all of the carrier checking code Marek Vasut
2019-01-03 1:10 ` [PATCH 19/19] usbnet: smsc95xx: Use phy bit operations Marek Vasut
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=20190103011040.25974-6-marex@denx.de \
--to=marex@denx.de \
--cc=Nisar.Sayed@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-usb@vger.kernel.org \
--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).