]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
PCI: Make pcim_request_all_regions() a public function
authorPhilipp Stanner <pstanner@redhat.com>
Wed, 30 Oct 2024 11:27:34 +0000 (12:27 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 30 Oct 2024 21:07:36 +0000 (16:07 -0500)
In order to remove the deprecated function
pcim_iomap_regions_request_all(), a few drivers need an interface to
request all BARs a PCI device offers.

Make pcim_request_all_regions() a public interface.

Link: https://lore.kernel.org/r/20241030112743.104395-2-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/pci/devres.c
include/linux/pci.h

index b133967faef84071d9425b055d0aa6cff462dec5..2a64da5c91fb9bf088203ed6ead66851d849f221 100644 (file)
@@ -939,7 +939,7 @@ static void pcim_release_all_regions(struct pci_dev *pdev)
  * desired, release individual regions with pcim_release_region() or all of
  * them at once with pcim_release_all_regions().
  */
-static int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
+int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
 {
        int ret;
        int bar;
@@ -957,6 +957,7 @@ err:
 
        return ret;
 }
+EXPORT_SYMBOL(pcim_request_all_regions);
 
 /**
  * pcim_iomap_regions_request_all - Request all BARs and iomap specified ones
index 573b4c4c2be61f86338e753d97bc618a4dd25ccd..3b151c8331e590f8879ba8d50961a079fbe79251 100644 (file)
@@ -2293,6 +2293,7 @@ static inline void pci_fixup_device(enum pci_fixup_pass pass,
                                    struct pci_dev *dev) { }
 #endif
 
+int pcim_request_all_regions(struct pci_dev *pdev, const char *name);
 void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
 void __iomem *pcim_iomap_region(struct pci_dev *pdev, int bar,
                                const char *name);