Skip to content

Commit 3dd6ed2

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
wifi: iwlwifi: replace deprecated PCI functions
pcim_iomap_table() and pcim_iomap_regions_request_all() have been deprecated by the PCI subsystem in commit e354bb8 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Replace these functions with their successors, pcim_iomap() and pcim_request_all_regions(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Stanner <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Kalle Valo <[email protected]>
1 parent abbc299 commit 3dd6ed2

File tree

1 file changed

+4
-12
lines changed
  • drivers/net/wireless/intel/iwlwifi/pcie

1 file changed

+4
-12
lines changed

drivers/net/wireless/intel/iwlwifi/pcie/trans.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3533,7 +3533,6 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
35333533
struct iwl_trans_pcie *trans_pcie, **priv;
35343534
struct iwl_trans *trans;
35353535
int ret, addr_size;
3536-
void __iomem * const *table;
35373536
u32 bar0;
35383537

35393538
/* reassign our BAR 0 if invalid due to possible runtime PM races */
@@ -3659,22 +3658,15 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
36593658
}
36603659
}
36613660

3662-
ret = pcim_iomap_regions_request_all(pdev, BIT(0), DRV_NAME);
3661+
ret = pcim_request_all_regions(pdev, DRV_NAME);
36633662
if (ret) {
3664-
dev_err(&pdev->dev, "pcim_iomap_regions_request_all failed\n");
3663+
dev_err(&pdev->dev, "Requesting all PCI BARs failed.\n");
36653664
goto out_no_pci;
36663665
}
36673666

3668-
table = pcim_iomap_table(pdev);
3669-
if (!table) {
3670-
dev_err(&pdev->dev, "pcim_iomap_table failed\n");
3671-
ret = -ENOMEM;
3672-
goto out_no_pci;
3673-
}
3674-
3675-
trans_pcie->hw_base = table[0];
3667+
trans_pcie->hw_base = pcim_iomap(pdev, 0, 0);
36763668
if (!trans_pcie->hw_base) {
3677-
dev_err(&pdev->dev, "couldn't find IO mem in first BAR\n");
3669+
dev_err(&pdev->dev, "Could not ioremap PCI BAR 0.\n");
36783670
ret = -ENODEV;
36793671
goto out_no_pci;
36803672
}

0 commit comments

Comments
 (0)