Merge ../linux-2.6 by hand
[linux-2.6-microblaze.git] / drivers / pci / setup-res.c
index 5598b47..50d6685 100644 (file)
@@ -26,7 +26,7 @@
 #include "pci.h"
 
 
-static void
+void
 pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
 {
        struct pci_bus_region region;
@@ -97,10 +97,7 @@ pci_claim_resource(struct pci_dev *dev, int resource)
        char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge";
        int err;
 
-       if (res->flags & IORESOURCE_IO)
-               root = &ioport_resource;
-       if (res->flags & IORESOURCE_MEM)
-               root = &iomem_resource;
+       root = pcibios_select_root(dev, res);
 
        err = -EINVAL;
        if (root != NULL)