r8169: use helper rtl_hw_aspm_clkreq_enable also in rtl_hw_start_8168g_2
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 24 Oct 2019 22:30:38 +0000 (00:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Oct 2019 23:19:04 +0000 (16:19 -0700)
One place in the driver was left where the open-coded functionality
hasn't been replaced with helper rtl_hw_aspm_clkreq_enable yet.

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

index 91978ce92e20f0b55b08d2414523a8a2f86910a5..dfd92f61e9f604d17613a9c40590a2e341694e2f 100644 (file)
@@ -4710,8 +4710,7 @@ static void rtl_hw_start_8168g_2(struct rtl8169_private *tp)
        rtl_hw_start_8168g(tp);
 
        /* disable aspm and clock request before access ephy */
-       RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~ClkReqEn);
-       RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~ASPM_en);
+       rtl_hw_aspm_clkreq_enable(tp, false);
        rtl_ephy_init(tp, e_info_8168g_2);
 }