Skip to content

Commit abbc299

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
intel_th: pci: 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: Alexander Shishkin <[email protected]>
1 parent cf43d99 commit abbc299

File tree

1 file changed

+7
-2
lines changed
  • drivers/hwtracing/intel_th

1 file changed

+7
-2
lines changed

drivers/hwtracing/intel_th/pci.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ enum {
2323
TH_PCI_RTIT_BAR = 4,
2424
};
2525

26-
#define BAR_MASK (BIT(TH_PCI_CONFIG_BAR) | BIT(TH_PCI_STH_SW_BAR))
2726

2827
#define PCI_REG_NPKDSC 0x80
2928
#define NPKDSC_TSACT BIT(5)
@@ -83,10 +82,16 @@ static int intel_th_pci_probe(struct pci_dev *pdev,
8382
if (err)
8483
return err;
8584

86-
err = pcim_iomap_regions_request_all(pdev, BAR_MASK, DRIVER_NAME);
85+
err = pcim_request_all_regions(pdev, DRIVER_NAME);
8786
if (err)
8887
return err;
8988

89+
if (!pcim_iomap(pdev, TH_PCI_CONFIG_BAR, 0))
90+
return -ENOMEM;
91+
92+
if (!pcim_iomap(pdev, TH_PCI_STH_SW_BAR, 0))
93+
return -ENOMEM;
94+
9095
if (pdev->resource[TH_PCI_RTIT_BAR].start) {
9196
resource[TH_MMIO_RTIT] = pdev->resource[TH_PCI_RTIT_BAR];
9297
r++;

0 commit comments

Comments
 (0)