]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
phy: realtek: don't duplicate genphy_startup
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 28 Mar 2023 21:21:08 +0000 (23:21 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 5 May 2023 21:48:44 +0000 (17:48 -0400)
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

index 247d9753a88dad79c5c7891c3b7bb66c0fe10e18..396cac76d632e3a53088b2686b6e82f786115953 100644 (file)
@@ -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 @@ U_BOOT_PHY_DRIVER(rtl8211e) = {
        .features = PHY_GBIT_FEATURES,
        .probe = &rtl8211e_probe,
        .config = &rtl8211e_config,
-       .startup = &rtl8211e_startup,
+       .startup = &genphy_startup,
        .shutdown = &genphy_shutdown,
 };
 
@@ -465,6 +454,6 @@ U_BOOT_PHY_DRIVER(rtl8201f) = {
        .features = PHY_BASIC_FEATURES,
        .probe = &rtl8210f_probe,
        .config = &rtl8201f_config,
-       .startup = &rtl8211e_startup,
+       .startup = &genphy_startup,
        .shutdown = &genphy_shutdown,
 };