Skip to content

Commit

Permalink
r8169: improve rtl8169_runtime_resume
Browse files Browse the repository at this point in the history
Simplify rtl8169_runtime_resume() by calling rtl8169_resume().

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Jun 22, 2020
1 parent 06a14ab commit 288302d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions drivers/net/ethernet/realtek/r8169_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4758,13 +4758,13 @@ static int __maybe_unused rtl8169_suspend(struct device *device)
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);

rtl_rar_set(tp, tp->dev->dev_addr);

if (netif_running(tp->dev))
if (tp->TxDescArray)
rtl8169_up(tp);

netif_device_attach(tp->dev);
Expand Down Expand Up @@ -4793,16 +4793,9 @@ static int rtl8169_runtime_resume(struct device *device)
{
struct rtl8169_private *tp = dev_get_drvdata(device);

rtl_rar_set(tp, tp->dev->dev_addr);

__rtl8169_set_wol(tp, tp->saved_wolopts);

if (tp->TxDescArray)
rtl8169_up(tp);

netif_device_attach(tp->dev);

return 0;
return rtl8169_resume(device);
}

static int rtl8169_runtime_idle(struct device *device)
Expand Down

0 comments on commit 288302d

Please sign in to comment.