Message ID | 20240821071842.8591-4-pstanner@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | PCI: Remove pcim_iounmap_regions() | expand |
On Wed, Aug 21, 2024 at 10:19 AM Philipp Stanner <pstanner@redhat.com> wrote: > > pcim_iomap_regions() and pcim_iomap_table() have been deprecated by the > PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate > pcim_iomap_table(), pcim_iomap_regions_request_all()"). > > Port dfl-pci.c to the successor, pcim_iomap_region(). > > Consistently, replace pcim_iounmap_regions() with pcim_iounmap_region(). > static void __iomem *cci_pci_ioremap_bar0(struct pci_dev *pcidev) > { > - if (pcim_iomap_regions(pcidev, BIT(0), DRV_NAME)) > + void __iomem *bar0; > + > + bar0 = pcim_iomap_region(pcidev, 0, DRV_NAME); > + if (IS_ERR(bar0)) > return NULL; > > - return pcim_iomap_table(pcidev)[0]; > + return bar0; > } Now this becomes an unneeded wrapper on pcim_ioremap_region(). Can we kill this helper completely?
diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c index 80cac3a5f976..2099c497feec 100644 --- a/drivers/fpga/dfl-pci.c +++ b/drivers/fpga/dfl-pci.c @@ -41,10 +41,13 @@ struct cci_drvdata { static void __iomem *cci_pci_ioremap_bar0(struct pci_dev *pcidev) { - if (pcim_iomap_regions(pcidev, BIT(0), DRV_NAME)) + void __iomem *bar0; + + bar0 = pcim_iomap_region(pcidev, 0, DRV_NAME); + if (IS_ERR(bar0)) return NULL; - return pcim_iomap_table(pcidev)[0]; + return bar0; } static int cci_pci_alloc_irq(struct pci_dev *pcidev) @@ -296,7 +299,7 @@ static int find_dfls_by_default(struct pci_dev *pcidev, } /* release I/O mappings for next step enumeration */ - pcim_iounmap_regions(pcidev, BIT(0)); + pcim_iounmap_region(pcidev, 0); return ret; }
pcim_iomap_regions() and pcim_iomap_table() have been deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). Port dfl-pci.c to the successor, pcim_iomap_region(). Consistently, replace pcim_iounmap_regions() with pcim_iounmap_region(). Signed-off-by: Philipp Stanner <pstanner@redhat.com> --- drivers/fpga/dfl-pci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)