Pull thermal into release branch
[linux-drm-fsl-dcu.git] / arch / powerpc / kernel / pci_32.c
index 5b05a09a6bdf5d43d26537a73d50c04792157e9b..e66064b5093a2496ad2e03e9ebd1212ba98ad72b 100644 (file)
@@ -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);
        }
 }
        
@@ -1655,7 +1658,7 @@ pgprot_t pci_phys_mem_access_prot(struct file *file,
        int i;
 
        if (page_is_ram(pfn))
-               return prot;
+               return __pgprot(prot);
 
        prot |= _PAGE_NO_CACHE | _PAGE_GUARDED;