aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/bus.c4
-rw-r--r--drivers/pci/pci.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 712250f5874a..26301cb25e7f 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -288,9 +288,9 @@ void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *),
288 next = dev->bus_list.next; 288 next = dev->bus_list.next;
289 289
290 /* Run device routines with the device locked */ 290 /* Run device routines with the device locked */
291 down(&dev->dev.sem); 291 device_lock(&dev->dev);
292 retval = cb(dev, userdata); 292 retval = cb(dev, userdata);
293 up(&dev->dev.sem); 293 device_unlock(&dev->dev);
294 if (retval) 294 if (retval)
295 break; 295 break;
296 } 296 }
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 77b493b3d97b..897fa5ccdb78 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2486,7 +2486,7 @@ static int pci_dev_reset(struct pci_dev *dev, int probe)
2486 if (!probe) { 2486 if (!probe) {
2487 pci_block_user_cfg_access(dev); 2487 pci_block_user_cfg_access(dev);
2488 /* block PM suspend, driver probe, etc. */ 2488 /* block PM suspend, driver probe, etc. */
2489 down(&dev->dev.sem); 2489 device_lock(&dev->dev);
2490 } 2490 }
2491 2491
2492 rc = pci_dev_specific_reset(dev, probe); 2492 rc = pci_dev_specific_reset(dev, probe);
@@ -2508,7 +2508,7 @@ static int pci_dev_reset(struct pci_dev *dev, int probe)
2508 rc = pci_parent_bus_reset(dev, probe); 2508 rc = pci_parent_bus_reset(dev, probe);
2509done: 2509done:
2510 if (!probe) { 2510 if (!probe) {
2511 up(&dev->dev.sem); 2511 device_unlock(&dev->dev);
2512 pci_unblock_user_cfg_access(dev); 2512 pci_unblock_user_cfg_access(dev);
2513 } 2513 }
2514 2514