sh: pci: Allow register_pci_controller() to handle overlapping regions.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, June 18, 2009 - 3:03 pm

Gitweb:     http://git.kernel.org/linus/8c6b44d00aca45edf69b35220ba4dce962c482f8
Commit:     8c6b44d00aca45edf69b35220ba4dce962c482f8
Parent:     8b27fc6de184d66347e4aceeb5c0a4262732cc03
Author:     Paul Mundt <lethal@linux-sh.org>
AuthorDate: Tue Jun 16 06:01:58 2009 +0900
Committer:  Paul Mundt <lethal@linux-sh.org>
CommitDate: Tue Jun 16 06:01:58 2009 +0900

    sh: pci: Allow register_pci_controller() to handle overlapping regions.
    
    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 |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 54d77cb..9a1c423 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -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)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sh: pci: Allow register_pci_controller() to handle overlap ..., Linux Kernel Mailing ..., (Thu Jun 18, 3:03 pm)