MIPS: avoid possible resource conflict in register_pci_controller
authorGabor Juhos <juhosg@openwrt.org>
Sat, 2 Feb 2013 13:18:54 +0000 (13:18 +0000)
committerJohn Crispin <blogic@openwrt.org>
Sun, 17 Feb 2013 00:25:37 +0000 (01:25 +0100)
commit222831787704c9ad9215f6b56f975b233968607c
treed5b2490fa6f15c7a781d3951aeaeb18a27872c53
parent6e783865b4e60f2ecf7708f8ea24db5c5ea07ced
MIPS: avoid possible resource conflict in register_pci_controller

The IO and memory resources of a PCI controller
might already have a parent resource set when
they are passed to 'register_pci_controller'.

If the parent resource is set, the request_resource
call will fail due to resource conflict and the
current code will not be able to register the
PCI controller.

Use the parent resource if it is available in the
request_resource call to avoid the isssue.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/4910/
Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/pci/pci.c