]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
PCI: Make pcim_request_region() a public function
authorPhilipp Stanner <pstanner@redhat.com>
Mon, 29 Jul 2024 09:36:26 +0000 (11:36 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 9 Aug 2024 20:08:18 +0000 (15:08 -0500)
pcim_request_region() is the managed counterpart of pci_request_region().
It is currently only used internally for PCI.

It can be useful for a number of drivers and exporting it is a step towards
deprecating more complicated functions.

Make pcim_request_region() a public function.

Link: https://lore.kernel.org/r/20240729093625.17561-4-pstanner@redhat.com
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
drivers/pci/devres.c
drivers/pci/pci.h
include/linux/pci.h

index 3780a9f9ec003e625ea00900e917d82852e3cbf2..0127ca58c6e5c8700915d548f3cb61dbfe26bacf 100644 (file)
@@ -863,6 +863,7 @@ int pcim_request_region(struct pci_dev *pdev, int bar, const char *name)
 {
        return _pcim_request_region(pdev, bar, name, 0);
 }
+EXPORT_SYMBOL(pcim_request_region);
 
 /**
  * pcim_request_region_exclusive - Request a PCI BAR exclusively
index 79c8398f39384c75e9851dadf8f4caaec5a0fc2e..2fe6055a334d078a5f57be72d51afacea390716f 100644 (file)
@@ -887,8 +887,6 @@ static inline pci_power_t mid_pci_get_power_state(struct pci_dev *pdev)
 #endif
 
 int pcim_intx(struct pci_dev *dev, int enable);
-
-int pcim_request_region(struct pci_dev *pdev, int bar, const char *name);
 int pcim_request_region_exclusive(struct pci_dev *pdev, int bar,
                                  const char *name);
 void pcim_release_region(struct pci_dev *pdev, int bar);
index 4cf89a4b4cbcf03ec093376092178a1fd4efd9a4..4246cb790c7b30f0557e58ef78b14ef1276a6e33 100644 (file)
@@ -2292,6 +2292,7 @@ static inline void pci_fixup_device(enum pci_fixup_pass pass,
 void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
 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);
 int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
                                   const char *name);