diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-02-01 13:11:25 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-01 13:11:25 +0900 |
commit | bcf39352eb9e9026f7a1028d4bce3707b65f104b (patch) | |
tree | 440794a7fe888c48bfb49bdd994873ae8a136866 /arch/sh/drivers/pci/pci.c | |
parent | 85b59f5bb24aeca1a987cbb206e228bf630c8327 (diff) |
sh: Handle PCI controller resource conflicts.
register_pci_controller() can fail, but presently is a void function.
Change this over to an int so that we can bail early before continuing on
with post-registration initialization (such as throwing the controller in
to 66MHz mode in the case of the SH7780 host controller).
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/pci.c')
-rw-r--r-- | arch/sh/drivers/pci/pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index 63b11fddffe..488331c4503 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c @@ -58,7 +58,7 @@ static void __devinit pcibios_scanbus(struct pci_channel *hose) static DEFINE_MUTEX(pci_scan_mutex); -void __devinit register_pci_controller(struct pci_channel *hose) +int __devinit register_pci_controller(struct pci_channel *hose) { if (request_resource(&iomem_resource, hose->mem_resource) < 0) goto out; @@ -88,10 +88,11 @@ void __devinit register_pci_controller(struct pci_channel *hose) mutex_unlock(&pci_scan_mutex); } - return; + return 0; out: printk(KERN_WARNING "Skipping PCI bus scan due to resource conflict\n"); + return -1; } static int __init pcibios_init(void) |