r8169: remove rtl_hw_init_8168ep
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 25 May 2019 18:43:25 +0000 (20:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 May 2019 05:19:39 +0000 (22:19 -0700)
rtl_hw_init_8168ep() can be removed, this simplifies the code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c

index 8e404186ef87d3f46288b6ae28b2ecd1160da2e9..c6969465303e7b236b10e6ac2e1cb15796297634 100644 (file)
@@ -7047,21 +7047,15 @@ static void rtl_hw_init_8168g(struct rtl8169_private *tp)
                return;
 }
 
-static void rtl_hw_init_8168ep(struct rtl8169_private *tp)
-{
-       rtl8168ep_stop_cmac(tp);
-       rtl_hw_init_8168g(tp);
-}
-
 static void rtl_hw_initialize(struct rtl8169_private *tp)
 {
        switch (tp->mac_version) {
+       case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_51:
+               rtl8168ep_stop_cmac(tp);
+               /* fall through */
        case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48:
                rtl_hw_init_8168g(tp);
                break;
-       case RTL_GIGA_MAC_VER_49 ... RTL_GIGA_MAC_VER_51:
-               rtl_hw_init_8168ep(tp);
-               break;
        default:
                break;
        }