[PATCH] phy: realtek: don't duplicate genphy_startup

rtl8211e_startup() is an exact copy of genphy_startup(). Use that instead of duplicating it.
Signed-off-by: Rasmus Villemoes rasmus.villemoes@prevas.dk --- drivers/net/phy/realtek.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 24c3ea59bb..6c93771673 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -384,17 +384,6 @@ static int rtl8211x_startup(struct phy_device *phydev) return rtl8211x_parse_status(phydev); }
-static int rtl8211e_startup(struct phy_device *phydev) -{ - int ret; - - ret = genphy_update_link(phydev); - if (ret) - return ret; - - return genphy_parse_link(phydev); -} - static int rtl8211f_startup(struct phy_device *phydev) { int ret; @@ -428,7 +417,7 @@ static struct phy_driver RTL8211E_driver = { .features = PHY_GBIT_FEATURES, .probe = &rtl8211e_probe, .config = &rtl8211e_config, - .startup = &rtl8211e_startup, + .startup = &genphy_startup, .shutdown = &genphy_shutdown, };
@@ -465,7 +454,7 @@ static struct phy_driver RTL8201F_driver = { .features = PHY_BASIC_FEATURES, .probe = &rtl8210f_probe, .config = &rtl8201f_config, - .startup = &rtl8211e_startup, + .startup = &genphy_startup, .shutdown = &genphy_shutdown, };

On Tue, Mar 28, 2023 at 11:21:08PM +0200, Rasmus Villemoes wrote:
rtl8211e_startup() is an exact copy of genphy_startup(). Use that instead of duplicating it.
Signed-off-by: Rasmus Villemoes rasmus.villemoes@prevas.dk
Applied to u-boot/master, thanks!
participants (2)
-
Rasmus Villemoes
-
Tom Rini