summaryrefslogtreecommitdiff
path: root/target/mips/mikrotik-rb532/patches/3.15-rc5/rb532-pci.patch
blob: 73d977e08ce2725a63af7d720ee6487003f9ba55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff -Nur linux-3.15-rc5.orig/arch/mips/pci/pci.c linux-3.15-rc5/arch/mips/pci/pci.c
--- linux-3.15-rc5.orig/arch/mips/pci/pci.c	2014-05-09 22:10:52.000000000 +0200
+++ linux-3.15-rc5/arch/mips/pci/pci.c	2014-05-10 21:18:58.000000000 +0200
@@ -166,20 +166,10 @@
 
 void register_pci_controller(struct pci_controller *hose)
 {
-	struct resource *parent;
-
-	parent = hose->mem_resource->parent;
-	if (!parent)
-		parent = &iomem_resource;
-
-	if (request_resource(parent, hose->mem_resource) < 0)
+	if (request_resource(&iomem_resource, hose->mem_resource) < 0)
 		goto out;
 
-	parent = hose->io_resource->parent;
-	if (!parent)
-		parent = &ioport_resource;
-
-	if (request_resource(parent, hose->io_resource) < 0) {
+	if (request_resource(&ioport_resource, hose->io_resource) < 0) {
 		release_resource(hose->mem_resource);
 		goto out;
 	}