diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2006-02-23 17:12:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-23 14:35:14 -0800 |
commit | b89b7ea05a8f71426bd36ed12e6cd73179d0f720 (patch) | |
tree | db1212d7f74c7d1e98614fb593bcfb8801f5e8b0 /drivers/pci | |
parent | 8c4b2cf9af9b4ecc29d4f0ec4ecc8e94dc4432d7 (diff) | |
download | blackbird-op-linux-b89b7ea05a8f71426bd36ed12e6cd73179d0f720.tar.gz blackbird-op-linux-b89b7ea05a8f71426bd36ed12e6cd73179d0f720.zip |
[PATCH] PCI: Move pci_dev_put outside a spinlock
This patch (as659) fixes a might_sleep problem in the PCI core, by moving
a call to pci_dev_put() outside the scope of a spinlock.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/search.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 05fa91a31c62..ce7dd6e7be60 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c @@ -246,9 +246,9 @@ pci_get_subsys(unsigned int vendor, unsigned int device, } dev = NULL; exit: - pci_dev_put(from); dev = pci_dev_get(dev); spin_unlock(&pci_bus_lock); + pci_dev_put(from); return dev; } @@ -339,9 +339,9 @@ struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from) } dev = NULL; exit: - pci_dev_put(from); dev = pci_dev_get(dev); spin_unlock(&pci_bus_lock); + pci_dev_put(from); return dev; } |