diff mbox series

[U-Boot,9/9] phy: atheros: consolidate {ar8031|ar8035}_config()

Message ID 20191026002630.25865-10-michael@walle.cc
State Superseded
Delegated to: Joe Hershberger
Headers show
Series phy: atheros: cleanup and device tree bindings | expand

Commit Message

Michael Walle Oct. 26, 2019, 12:26 a.m. UTC
The two functions are now exactly the same, remove one of them.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/net/phy/atheros.c | 30 +++---------------------------
 1 file changed, 3 insertions(+), 27 deletions(-)

Comments

Joe Hershberger Nov. 30, 2019, 1:19 a.m. UTC | #1
On Fri, Oct 25, 2019 at 7:29 PM Michael Walle <michael@walle.cc> wrote:
>
> The two functions are now exactly the same, remove one of them.
>
> Signed-off-by: Michael Walle <michael@walle.cc>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
diff mbox series

Patch

diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index 91fcbf912a..922dc91835 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -241,31 +241,7 @@  static int ar803x_of_init(struct phy_device *phydev)
 	return 0;
 }
 
-static int ar8031_config(struct phy_device *phydev)
-{
-	int ret;
-
-	ret = ar803x_of_init(phydev);
-	if (ret < 0)
-		return ret;
-
-	ret = ar803x_delay_config(phydev);
-	if (ret < 0)
-		return ret;
-
-	ret = ar803x_regs_config(phydev);
-	if (ret < 0)
-		return ret;
-
-	phydev->supported = phydev->drv->features;
-
-	genphy_config_aneg(phydev);
-	genphy_restart_aneg(phydev);
-
-	return 0;
-}
-
-static int ar8035_config(struct phy_device *phydev)
+static int ar803x_config(struct phy_device *phydev)
 {
 	int ret;
 
@@ -304,7 +280,7 @@  static struct phy_driver AR8031_driver =  {
 	.uid = 0x4dd074,
 	.mask = 0xffffffef,
 	.features = PHY_GBIT_FEATURES,
-	.config = ar8031_config,
+	.config = ar803x_config,
 	.startup = genphy_startup,
 	.shutdown = genphy_shutdown,
 };
@@ -314,7 +290,7 @@  static struct phy_driver AR8035_driver =  {
 	.uid = 0x4dd072,
 	.mask = 0xffffffef,
 	.features = PHY_GBIT_FEATURES,
-	.config = ar8035_config,
+	.config = ar803x_config,
 	.startup = genphy_startup,
 	.shutdown = genphy_shutdown,
 };