diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-06-22 19:28:23 -0700 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2021-06-24 13:32:31 -0600 |
commit | e3a9b1212b9d6cb20751196e338f4a5138d539d3 (patch) | |
tree | 88daa90a1b7f8af30010d12af9ca09dff5163ca5 /drivers/pci | |
parent | 0af5160edb87b1868eba514422d3991628a018f8 (diff) |
PCI: Export pci_dev_trylock() and pci_dev_unlock()
Other places in the kernel use this form, and so just
provide a common path for it.
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Link: https://lore.kernel.org/r/20210623022824.308041-2-mcgrof@kernel.org
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b717680377a9..10f08ed3589f 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5028,7 +5028,7 @@ static void pci_dev_lock(struct pci_dev *dev) } /* Return 1 on successful lock, 0 on contention */ -static int pci_dev_trylock(struct pci_dev *dev) +int pci_dev_trylock(struct pci_dev *dev) { if (pci_cfg_access_trylock(dev)) { if (device_trylock(&dev->dev)) @@ -5038,12 +5038,14 @@ static int pci_dev_trylock(struct pci_dev *dev) return 0; } +EXPORT_SYMBOL_GPL(pci_dev_trylock); -static void pci_dev_unlock(struct pci_dev *dev) +void pci_dev_unlock(struct pci_dev *dev) { device_unlock(&dev->dev); pci_cfg_access_unlock(dev); } +EXPORT_SYMBOL_GPL(pci_dev_unlock); static void pci_dev_save_and_disable(struct pci_dev *dev) { |