Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360081
b: refs/heads/master
c: 2228317
h: refs/heads/master
i:
  360079: 980930f
v: v3
  • Loading branch information
Gabor Juhos authored and John Crispin committed Feb 17, 2013
1 parent f662fb5 commit 4d33b63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e783865b4e60f2ecf7708f8ea24db5c5ea07ced
refs/heads/master: 222831787704c9ad9215f6b56f975b233968607c
15 changes: 13 additions & 2 deletions trunk/arch/mips/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,20 @@ static DEFINE_MUTEX(pci_scan_mutex);

void register_pci_controller(struct pci_controller *hose)
{
if (request_resource(&iomem_resource, hose->mem_resource) < 0)
struct resource *parent;

parent = hose->mem_resource->parent;
if (!parent)
parent = &iomem_resource;

if (request_resource(parent, hose->mem_resource) < 0)
goto out;
if (request_resource(&ioport_resource, hose->io_resource) < 0) {

parent = hose->io_resource->parent;
if (!parent)
parent = &ioport_resource;

if (request_resource(parent, hose->io_resource) < 0) {
release_resource(hose->mem_resource);
goto out;
}
Expand Down

0 comments on commit 4d33b63

Please sign in to comment.