From: Heiner Kallweit Date: Sat, 20 Jun 2020 20:39:35 +0000 (+0200) Subject: r8169: improve rtl8169_runtime_resume X-Git-Tag: v5.15~3197^2~457^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=288302dab34ece4993ea3dd011299f406b78f237;p=platform%2Fkernel%2Flinux-starfive.git r8169: improve rtl8169_runtime_resume Simplify rtl8169_runtime_resume() by calling rtl8169_resume(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 154488202f0f..7e2a62a9ed61 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -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); @@ -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)