Commit 288302da authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: improve rtl8169_runtime_resume

Simplify rtl8169_runtime_resume() by calling rtl8169_resume().
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 06a14ab8
...@@ -4758,13 +4758,13 @@ static int __maybe_unused rtl8169_suspend(struct device *device) ...@@ -4758,13 +4758,13 @@ static int __maybe_unused rtl8169_suspend(struct device *device)
return 0; return 0;
} }
static int __maybe_unused rtl8169_resume(struct device *device) static int rtl8169_resume(struct device *device)
{ {
struct rtl8169_private *tp = dev_get_drvdata(device); struct rtl8169_private *tp = dev_get_drvdata(device);
rtl_rar_set(tp, tp->dev->dev_addr); rtl_rar_set(tp, tp->dev->dev_addr);
if (netif_running(tp->dev)) if (tp->TxDescArray)
rtl8169_up(tp); rtl8169_up(tp);
netif_device_attach(tp->dev); netif_device_attach(tp->dev);
...@@ -4793,16 +4793,9 @@ static int rtl8169_runtime_resume(struct device *device) ...@@ -4793,16 +4793,9 @@ static int rtl8169_runtime_resume(struct device *device)
{ {
struct rtl8169_private *tp = dev_get_drvdata(device); struct rtl8169_private *tp = dev_get_drvdata(device);
rtl_rar_set(tp, tp->dev->dev_addr);
__rtl8169_set_wol(tp, tp->saved_wolopts); __rtl8169_set_wol(tp, tp->saved_wolopts);
if (tp->TxDescArray) return rtl8169_resume(device);
rtl8169_up(tp);
netif_device_attach(tp->dev);
return 0;
} }
static int rtl8169_runtime_idle(struct device *device) static int rtl8169_runtime_idle(struct device *device)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment