PCI: Remove pcim_iounmap_regions()
authorPhilipp Stanner <pstanner@redhat.com>
Thu, 27 Mar 2025 11:07:08 +0000 (12:07 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 9 Apr 2025 19:22:44 +0000 (14:22 -0500)
All users of the deprecated function pcim_iounmap_regions() have been
ported by now. Remove it.

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Zijun Hu <quic_zijuhu@quicinc.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250327110707.20025-4-phasta@kernel.org
Documentation/driver-api/driver-model/devres.rst
drivers/pci/devres.c
include/linux/pci.h

index d75728eb05f85eca4e0fbf7961bfa8181106a778..601f1a74d34dacf27e5d2a258f23c6c00e68221f 100644 (file)
@@ -396,7 +396,6 @@ PCI
   pcim_iomap_regions()         : do request_region() and iomap() on multiple BARs
   pcim_iomap_table()           : array of mapped addresses indexed by BAR
   pcim_iounmap()               : do iounmap() on a single BAR
-  pcim_iounmap_regions()       : do iounmap() and release_region() on multiple BARs
   pcim_pin_device()            : keep PCI device enabled after release
   pcim_set_mwi()               : enable Memory-Write-Invalidate PCI transaction
 
index 73047316889e50f8709a93b8405320da421f20f8..0317c56ac27d766572ee3e60848ce79e1c6d4311 100644 (file)
@@ -955,30 +955,6 @@ err:
 }
 EXPORT_SYMBOL(pcim_request_all_regions);
 
-/**
- * pcim_iounmap_regions - Unmap and release PCI BARs (DEPRECATED)
- * @pdev: PCI device to map IO resources for
- * @mask: Mask of BARs to unmap and release
- *
- * Unmap and release regions specified by @mask.
- *
- * This function is DEPRECATED. Do not use it in new code.
- * Use pcim_iounmap_region() instead.
- */
-void pcim_iounmap_regions(struct pci_dev *pdev, int mask)
-{
-       int i;
-
-       for (i = 0; i < PCI_STD_NUM_BARS; i++) {
-               if (!mask_contains_bar(mask, i))
-                       continue;
-
-               pcim_iounmap_region(pdev, i);
-               pcim_remove_bar_from_legacy_table(pdev, i);
-       }
-}
-EXPORT_SYMBOL(pcim_iounmap_regions);
-
 /**
  * pcim_iomap_range - Create a ranged __iomap mapping within a PCI BAR
  * @pdev: PCI device to map IO resources for
index 0e8e3fd77e96713054388bdc82f439e51023c1bf..a60fdb344d9e3e690c9568c8cc2ed7ee76bc5256 100644 (file)
@@ -2322,7 +2322,6 @@ void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
 void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
 int pcim_request_region(struct pci_dev *pdev, int bar, const char *name);
 int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name);
-void pcim_iounmap_regions(struct pci_dev *pdev, int mask);
 void __iomem *pcim_iomap_range(struct pci_dev *pdev, int bar,
                                unsigned long offset, unsigned long len);