Merge tag 'for-linus-20180608' of git://git.kernel.dk/linux-block
[muen/linux.git] / drivers / nvme / host / pci.c
index cd7aec58a30157c9dcf6bd3cbf0faa0662b94f30..fc33804662e7bd35cfbacd93a26101bf23b3f43d 100644 (file)
@@ -2615,24 +2615,6 @@ static void nvme_remove(struct pci_dev *pdev)
        nvme_put_ctrl(&dev->ctrl);
 }
 
-static int nvme_pci_sriov_configure(struct pci_dev *pdev, int numvfs)
-{
-       int ret = 0;
-
-       if (numvfs == 0) {
-               if (pci_vfs_assigned(pdev)) {
-                       dev_warn(&pdev->dev,
-                               "Cannot disable SR-IOV VFs while assigned\n");
-                       return -EPERM;
-               }
-               pci_disable_sriov(pdev);
-               return 0;
-       }
-
-       ret = pci_enable_sriov(pdev, numvfs);
-       return ret ? ret : numvfs;
-}
-
 #ifdef CONFIG_PM_SLEEP
 static int nvme_suspend(struct device *dev)
 {
@@ -2759,7 +2741,7 @@ static struct pci_driver nvme_driver = {
        .driver         = {
                .pm     = &nvme_dev_pm_ops,
        },
-       .sriov_configure = nvme_pci_sriov_configure,
+       .sriov_configure = pci_sriov_configure_simple,
        .err_handler    = &nvme_err_handler,
 };