Skip to content

Commit 1711fd7

Browse files
Philipp Stannergregkh
authored andcommitted
PCI: Make pcim_request_all_regions() a public function
[ Upstream commit d9d959c ] 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> Stable-dep-of: d555ed4 ("PCI: Restore original INTX_DISABLE bit by pcim_intx()") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4543b1b commit 1711fd7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/pci/devres.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ static void pcim_release_all_regions(struct pci_dev *pdev)
939939
* desired, release individual regions with pcim_release_region() or all of
940940
* them at once with pcim_release_all_regions().
941941
*/
942-
static int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
942+
int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
943943
{
944944
int ret;
945945
int bar;
@@ -957,6 +957,7 @@ static int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
957957

958958
return ret;
959959
}
960+
EXPORT_SYMBOL(pcim_request_all_regions);
960961

961962
/**
962963
* pcim_iomap_regions_request_all - Request all BARs and iomap specified ones

include/linux/pci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,6 +2293,7 @@ static inline void pci_fixup_device(enum pci_fixup_pass pass,
22932293
struct pci_dev *dev) { }
22942294
#endif
22952295

2296+
int pcim_request_all_regions(struct pci_dev *pdev, const char *name);
22962297
void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
22972298
void __iomem *pcim_iomap_region(struct pci_dev *pdev, int bar,
22982299
const char *name);

0 commit comments

Comments
 (0)