Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[sfrench/cifs-2.6.git] / drivers / net / r8169.c
index 35540411990d5867f1ed9d44164fc8b7e47a8a11..078bbf4e6f1933f3ee1e95e2c0dccfea92157088 100644 (file)
@@ -3219,11 +3219,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
 
 
        device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
 
-       if (pci_dev_run_wake(pdev)) {
-               pm_runtime_set_active(&pdev->dev);
-               pm_runtime_enable(&pdev->dev);
-       }
-       pm_runtime_idle(&pdev->dev);
+       if (pci_dev_run_wake(pdev))
+               pm_runtime_put_noidle(&pdev->dev);
 
 out:
        return rc;
 
 out:
        return rc;
@@ -3246,17 +3243,12 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev)
        struct net_device *dev = pci_get_drvdata(pdev);
        struct rtl8169_private *tp = netdev_priv(dev);
 
        struct net_device *dev = pci_get_drvdata(pdev);
        struct rtl8169_private *tp = netdev_priv(dev);
 
-       pm_runtime_get_sync(&pdev->dev);
-
        flush_scheduled_work();
 
        unregister_netdev(dev);
 
        flush_scheduled_work();
 
        unregister_netdev(dev);
 
-       if (pci_dev_run_wake(pdev)) {
-               pm_runtime_disable(&pdev->dev);
-               pm_runtime_set_suspended(&pdev->dev);
-       }
-       pm_runtime_put_noidle(&pdev->dev);
+       if (pci_dev_run_wake(pdev))
+               pm_runtime_get_noresume(&pdev->dev);
 
        /* restore original MAC address */
        rtl_rar_set(tp, dev->perm_addr);
 
        /* restore original MAC address */
        rtl_rar_set(tp, dev->perm_addr);