Skip to content

Commit 7ff7509

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
PCI: Make pcim_request_region() a public function
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>
1 parent 8400291 commit 7ff7509

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/pci/devres.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,7 @@ int pcim_request_region(struct pci_dev *pdev, int bar, const char *name)
863863
{
864864
return _pcim_request_region(pdev, bar, name, 0);
865865
}
866+
EXPORT_SYMBOL(pcim_request_region);
866867

867868
/**
868869
* pcim_request_region_exclusive - Request a PCI BAR exclusively

drivers/pci/pci.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,8 +887,6 @@ static inline pci_power_t mid_pci_get_power_state(struct pci_dev *pdev)
887887
#endif
888888

889889
int pcim_intx(struct pci_dev *dev, int enable);
890-
891-
int pcim_request_region(struct pci_dev *pdev, int bar, const char *name);
892890
int pcim_request_region_exclusive(struct pci_dev *pdev, int bar,
893891
const char *name);
894892
void pcim_release_region(struct pci_dev *pdev, int bar);

include/linux/pci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,6 +2292,7 @@ static inline void pci_fixup_device(enum pci_fixup_pass pass,
22922292
void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
22932293
void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
22942294
void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
2295+
int pcim_request_region(struct pci_dev *pdev, int bar, const char *name);
22952296
int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name);
22962297
int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
22972298
const char *name);

0 commit comments

Comments
 (0)