r8169: move switching optional clock on/off to pll power functions
Relevant chip clocks are disabled in rtl_pll_power_down(), therefore move calling clk_disable_unprepare() there. Similar for enabling the clock. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a2ee847242
commit
9f0b54cd16
@ -2292,10 +2292,14 @@ static void rtl_pll_power_down(struct rtl8169_private *tp)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clk_disable_unprepare(tp->clk);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtl_pll_power_up(struct rtl8169_private *tp)
|
static void rtl_pll_power_up(struct rtl8169_private *tp)
|
||||||
{
|
{
|
||||||
|
clk_prepare_enable(tp->clk);
|
||||||
|
|
||||||
switch (tp->mac_version) {
|
switch (tp->mac_version) {
|
||||||
case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_33:
|
case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_33:
|
||||||
case RTL_GIGA_MAC_VER_37:
|
case RTL_GIGA_MAC_VER_37:
|
||||||
@ -4826,7 +4830,6 @@ static int __maybe_unused rtl8169_suspend(struct device *device)
|
|||||||
struct rtl8169_private *tp = dev_get_drvdata(device);
|
struct rtl8169_private *tp = dev_get_drvdata(device);
|
||||||
|
|
||||||
rtl8169_net_suspend(tp);
|
rtl8169_net_suspend(tp);
|
||||||
clk_disable_unprepare(tp->clk);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -4853,8 +4856,6 @@ static int __maybe_unused rtl8169_resume(struct device *device)
|
|||||||
|
|
||||||
rtl_rar_set(tp, tp->dev->dev_addr);
|
rtl_rar_set(tp, tp->dev->dev_addr);
|
||||||
|
|
||||||
clk_prepare_enable(tp->clk);
|
|
||||||
|
|
||||||
if (netif_running(tp->dev))
|
if (netif_running(tp->dev))
|
||||||
__rtl8169_resume(tp);
|
__rtl8169_resume(tp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user