]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: pci: Allow register_pci_controller() to handle overlapping regions.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 15 Jun 2009 21:01:58 +0000 (06:01 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 15 Jun 2009 21:01:58 +0000 (06:01 +0900)
Some host controllers (such as SH7786) have overlapping regions that are
fixed in hardware. The resource allocator does the right thing in
managing this space already, so the conflict case is non-fatal.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/drivers/pci/pci.c

index 54d77cbb8b39e62fa718191f1275df5b40ab8b56..9a1c423ad167705fae6ae4b1741ff1353800eb6c 100644 (file)
@@ -53,12 +53,8 @@ static DEFINE_MUTEX(pci_scan_mutex);
 
 void __devinit register_pci_controller(struct pci_channel *hose)
 {
-       if (request_resource(&iomem_resource, hose->mem_resource) < 0)
-               goto out;
-       if (request_resource(&ioport_resource, hose->io_resource) < 0) {
-               release_resource(hose->mem_resource);
-               goto out;
-       }
+       request_resource(&iomem_resource, hose->mem_resource);
+       request_resource(&ioport_resource, hose->io_resource);
 
        *hose_tail = hose;
        hose_tail = &hose->next;
@@ -80,12 +76,6 @@ void __devinit register_pci_controller(struct pci_channel *hose)
                pcibios_scanbus(hose);
                mutex_unlock(&pci_scan_mutex);
        }
-
-       return;
-
-out:
-       printk(KERN_WARNING
-              "Skipping PCI bus scan due to resource conflict\n");
 }
 
 static int __init pcibios_init(void)