diff options
-rw-r--r-- | drivers/pci/pci.c | 3 | ||||
-rw-r--r-- | include/linux/pci.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index da75c422ba85..193bfcda9c26 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5074,12 +5074,13 @@ static int pci_reset_bus_function(struct pci_dev *dev, bool probe) return pci_parent_bus_reset(dev, probe); } -static void pci_dev_lock(struct pci_dev *dev) +void pci_dev_lock(struct pci_dev *dev) { pci_cfg_access_lock(dev); /* block PM suspend, driver probe, etc. */ device_lock(&dev->dev); } +EXPORT_SYMBOL_GPL(pci_dev_lock); /* Return 1 on successful lock, 0 on contention */ int pci_dev_trylock(struct pci_dev *dev) diff --git a/include/linux/pci.h b/include/linux/pci.h index b4dbcc86b3f1..d307b071b65e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1664,6 +1664,7 @@ void pci_cfg_access_lock(struct pci_dev *dev); bool pci_cfg_access_trylock(struct pci_dev *dev); void pci_cfg_access_unlock(struct pci_dev *dev); +void pci_dev_lock(struct pci_dev *dev); int pci_dev_trylock(struct pci_dev *dev); void pci_dev_unlock(struct pci_dev *dev); |