diff options
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 712250f5874a..628ea20a8841 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -14,6 +14,7 @@ #include <linux/ioport.h> #include <linux/proc_fs.h> #include <linux/init.h> +#include <linux/slab.h> #include "pci.h" @@ -288,9 +289,9 @@ void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), next = dev->bus_list.next; /* Run device routines with the device locked */ - down(&dev->dev.sem); + device_lock(&dev->dev); retval = cb(dev, userdata); - up(&dev->dev.sem); + device_unlock(&dev->dev); if (retval) break; } |