Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab4627683a0e4430cb5acb1cd896f08ec5dad90c
Commit:     ab4627683a0e4430cb5acb1cd896f08ec5dad90c
Parent:     37f01d64d83705f82bb06eac8134acc8ef665565
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 23 14:47:59 2007 +0100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Tue Apr 24 22:12:20 2007 +1000

    [POWERPC] pci_32.c: Switch to ref counting PCI API
    
    pci_find_slot isn't hot-plug safe.  Move this code to the pci hotplug
    safe equivalent and hold a refcount properly while doing
    make_one_node_map.
    
    Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/pci_32.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 5b05a09..f022862 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -656,10 +656,13 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
                reg = of_get_property(node, "reg", NULL);
                if (!reg)
                        continue;
-               dev = pci_find_slot(pci_bus, ((reg[0] >> 8) & 0xff));
-               if (!dev || !dev->subordinate)
+               dev = pci_get_bus_and_slot(pci_bus, ((reg[0] >> 8) & 0xff));
+               if (!dev || !dev->subordinate) {
+                       pci_dev_put(dev);
                        continue;
+               }
                make_one_node_map(node, dev->subordinate->number);
+               pci_dev_put(dev);
        }
 }
        
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to