r8152: adjust rtl8153_runtime_enable function
authorhayeswang <hayeswang@realtek.com>
Fri, 9 Jun 2017 09:11:42 +0000 (17:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Jun 2017 19:37:00 +0000 (15:37 -0400)
Adjust the order of rtl8153_runtime_enable() according to the
suggestion from the engineer.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c

index e569c488a6b9f4f25c02f2c7e6834b7e046b20ff..32e83fd8b159e0a4beeba4a1f4f8b1b72a6de966 100644 (file)
@@ -2551,13 +2551,13 @@ static void rtl_runtime_suspend_enable(struct r8152 *tp, bool enable)
 
 static void rtl8153_runtime_enable(struct r8152 *tp, bool enable)
 {
-       rtl_runtime_suspend_enable(tp, enable);
-
        if (enable) {
                r8153_u1u2en(tp, false);
                r8153_u2p3en(tp, false);
                r8153_mac_clk_spd(tp, true);
+               rtl_runtime_suspend_enable(tp, true);
        } else {
+               rtl_runtime_suspend_enable(tp, false);
                r8153_mac_clk_spd(tp, false);
                r8153_u2p3en(tp, true);
                r8153_u1u2en(tp, true);