PPC pci_32: Stop using old hotplug unsafe APIs
PATCH 1/1 PPC pci_32: Stop using old hotplug unsafe APIs
pci_find_slot isn't hot-plug safe. Move this code to the pci hotplug safe equivalent and hold a refcount properly while doinmg make_one_node_map.
Signed-off-by Alan Cox <[email protected]>
arch/powerpc/kernel/pci_32.c +5 -2
@@ -656,10 +656,13 @@ reg =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); } }