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 e354bb84a4 ("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>
This commit is contained in:
Philipp Stanner 2024-10-30 12:27:38 +01:00 committed by Bjorn Helgaas
parent cf43d998fd
commit abbc299c71

View File

@ -23,7 +23,6 @@ enum {
TH_PCI_RTIT_BAR = 4,
};
#define BAR_MASK (BIT(TH_PCI_CONFIG_BAR) | BIT(TH_PCI_STH_SW_BAR))
#define PCI_REG_NPKDSC 0x80
#define NPKDSC_TSACT BIT(5)
@ -83,10 +82,16 @@ static int intel_th_pci_probe(struct pci_dev *pdev,
if (err)
return err;
err = pcim_iomap_regions_request_all(pdev, BAR_MASK, DRIVER_NAME);
err = pcim_request_all_regions(pdev, DRIVER_NAME);
if (err)
return err;
if (!pcim_iomap(pdev, TH_PCI_CONFIG_BAR, 0))
return -ENOMEM;
if (!pcim_iomap(pdev, TH_PCI_STH_SW_BAR, 0))
return -ENOMEM;
if (pdev->resource[TH_PCI_RTIT_BAR].start) {
resource[TH_MMIO_RTIT] = pdev->resource[TH_PCI_RTIT_BAR];
r++;