diff options
Diffstat (limited to 'drivers/pci/pci.c')
| -rw-r--r-- | drivers/pci/pci.c | 20 | 
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index f2cd11130737..3d2fb394986a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5106,12 +5106,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) @@ -5135,14 +5136,13 @@ EXPORT_SYMBOL_GPL(pci_dev_unlock);  static void pci_dev_save_and_disable(struct pci_dev *dev)  { -	struct pci_driver *drv = to_pci_driver(dev->dev.driver);  	const struct pci_error_handlers *err_handler = -			drv ? drv->err_handler : NULL; +			dev->driver ? dev->driver->err_handler : NULL;  	/* -	 * drv->err_handler->reset_prepare() is protected against races -	 * with ->remove() by the device lock, which must be held by the -	 * caller. +	 * dev->driver->err_handler->reset_prepare() is protected against +	 * races with ->remove() by the device lock, which must be held by +	 * the caller.  	 */  	if (err_handler && err_handler->reset_prepare)  		err_handler->reset_prepare(dev); @@ -5167,15 +5167,15 @@ static void pci_dev_save_and_disable(struct pci_dev *dev)  static void pci_dev_restore(struct pci_dev *dev)  { -	struct pci_driver *drv = to_pci_driver(dev->dev.driver);  	const struct pci_error_handlers *err_handler = -			drv ? drv->err_handler : NULL; +			dev->driver ? dev->driver->err_handler : NULL;  	pci_restore_state(dev);  	/* -	 * drv->err_handler->reset_done() is protected against races with -	 * ->remove() by the device lock, which must be held by the caller. +	 * dev->driver->err_handler->reset_done() is protected against +	 * races with ->remove() by the device lock, which must be held by +	 * the caller.  	 */  	if (err_handler && err_handler->reset_done)  		err_handler->reset_done(dev);  |