Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 e354bb84a4c1 ("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/20241030112743.104395-6-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>

authored by

Philipp Stanner and committed by
Bjorn Helgaas
abbc299c cf43d998

+7 -2
+7 -2
drivers/hwtracing/intel_th/pci.c
··· 23 23 TH_PCI_RTIT_BAR = 4, 24 24 }; 25 25 26 - #define BAR_MASK (BIT(TH_PCI_CONFIG_BAR) | BIT(TH_PCI_STH_SW_BAR)) 27 26 28 27 #define PCI_REG_NPKDSC 0x80 29 28 #define NPKDSC_TSACT BIT(5) ··· 82 83 if (err) 83 84 return err; 84 85 85 - err = pcim_iomap_regions_request_all(pdev, BAR_MASK, DRIVER_NAME); 86 + err = pcim_request_all_regions(pdev, DRIVER_NAME); 86 87 if (err) 87 88 return err; 89 + 90 + if (!pcim_iomap(pdev, TH_PCI_CONFIG_BAR, 0)) 91 + return -ENOMEM; 92 + 93 + if (!pcim_iomap(pdev, TH_PCI_STH_SW_BAR, 0)) 94 + return -ENOMEM; 88 95 89 96 if (pdev->resource[TH_PCI_RTIT_BAR].start) { 90 97 resource[TH_MMIO_RTIT] = pdev->resource[TH_PCI_RTIT_BAR];