aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/r8169.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r--drivers/net/r8169.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 35540411990d..078bbf4e6f19 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3219,11 +3219,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
3219 3219
3220 device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL); 3220 device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
3221 3221
3222 if (pci_dev_run_wake(pdev)) { 3222 if (pci_dev_run_wake(pdev))
3223 pm_runtime_set_active(&pdev->dev); 3223 pm_runtime_put_noidle(&pdev->dev);
3224 pm_runtime_enable(&pdev->dev);
3225 }
3226 pm_runtime_idle(&pdev->dev);
3227 3224
3228out: 3225out:
3229 return rc; 3226 return rc;
@@ -3246,17 +3243,12 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev)
3246 struct net_device *dev = pci_get_drvdata(pdev); 3243 struct net_device *dev = pci_get_drvdata(pdev);
3247 struct rtl8169_private *tp = netdev_priv(dev); 3244 struct rtl8169_private *tp = netdev_priv(dev);
3248 3245
3249 pm_runtime_get_sync(&pdev->dev);
3250
3251 flush_scheduled_work(); 3246 flush_scheduled_work();
3252 3247
3253 unregister_netdev(dev); 3248 unregister_netdev(dev);
3254 3249
3255 if (pci_dev_run_wake(pdev)) { 3250 if (pci_dev_run_wake(pdev))
3256 pm_runtime_disable(&pdev->dev); 3251 pm_runtime_get_noresume(&pdev->dev);
3257 pm_runtime_set_suspended(&pdev->dev);
3258 }
3259 pm_runtime_put_noidle(&pdev->dev);
3260 3252
3261 /* restore original MAC address */ 3253 /* restore original MAC address */
3262 rtl_rar_set(tp, dev->perm_addr); 3254 rtl_rar_set(tp, dev->perm_addr);