Now that we do have pci_request_mem_regions() and pci_release_mem_regions() at
hand, use it in the lpfc driver.

Suggested-by: Christoph Hellwig <[email protected]>
Signed-off-by: Johannes Thumshirn <[email protected]>
Cc: James Smart <[email protected]>
Cc: Dick Kennedy <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
 drivers/scsi/lpfc/lpfc_init.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index f57d02c..75af768 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -4820,17 +4820,14 @@ static void
 lpfc_disable_pci_dev(struct lpfc_hba *phba)
 {
        struct pci_dev *pdev;
-       int bars;
 
        /* Obtain PCI device reference */
        if (!phba->pcidev)
                return;
        else
                pdev = phba->pcidev;
-       /* Select PCI BARs */
-       bars = pci_select_bars(pdev, IORESOURCE_MEM);
        /* Release PCI resource and disable PCI device */
-       pci_release_selected_regions(pdev, bars);
+       pci_release_mem_regions(pdev);
        pci_disable_device(pdev);
 
        return;
-- 
1.8.5.6

Reply via email to