[PATCH] MIPS: pci: fix build errors in pci_load_of_ranges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'pci_load_of_ranges' function has been converted to use
the common 'of_pci_range_parser' helper by the following commit:
"of/pci: mips: convert to common of_pci_range_parser".

That change causes build error because the type of the 'range'
variable is defined as 'struct pci_of_range_range' instead of
the corect 'struct pci_of_range':

  arch/mips/pci/pci.c: In function 'pci_load_of_ranges':
  arch/mips/pci/pci.c:124:28: error: storage size of 'range' isn't known

Furthermore, the code uses non-existent fields:

  arch/mips/pci/pci.c: In function 'pci_load_of_ranges':
  arch/mips/pci/pci.c:139:4: error: 'struct of_pci_range' has no member named 'addr'
  arch/mips/pci/pci.c:139:4: error: 'struct of_pci_range' has no member named 'addr'
  arch/mips/pci/pci.c:142:20: error: 'struct of_pci_range' has no member named 'addr'
  arch/mips/pci/pci.c:145:4: error: 'struct of_pci_range' has no member named 'addr'
  arch/mips/pci/pci.c:145:4: error: 'struct of_pci_range' has no member named 'addr'

Use the correct structure and field names to fix the errors.

Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxx
Signed-off-by: Gabor Juhos <juhosg@xxxxxxxxxxx>
---
Note:

Although this is a MIPS specific patch, it should be merged via
the arm-soc tree, because the offending commit exist only in that.

The patch is based on the next/drivers branch of the arm-soc tree.
---
 arch/mips/pci/pci.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index bee49a4..9c15061 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -122,7 +122,7 @@ static void pcibios_scanbus(struct pci_controller *hose)
 #ifdef CONFIG_OF
 void pci_load_of_ranges(struct pci_controller *hose, struct device_node *node)
 {
-	struct of_pci_range_range range;
+	struct of_pci_range range;
 	struct of_pci_range_parser parser;
 	u32 res_type;
 
@@ -138,13 +138,16 @@ void pci_load_of_ranges(struct pci_controller *hose, struct device_node *node)
 		res_type = range.flags & IORESOURCE_TYPE_BITS;
 		if (res_type == IORESOURCE_IO) {
 			pr_info("  IO 0x%016llx..0x%016llx\n",
-				range.addr, range.addr + range.size - 1);
+				range.cpu_addr,
+				range.cpu_addr + range.size - 1);
 			hose->io_map_base =
-				(unsigned long)ioremap(range.addr, range.size);
+				(unsigned long)ioremap(range.cpu_addr,
+						       range.size);
 			res = hose->io_resource;
 		} else if (res_type == IORESOURCE_MEM) {
 			pr_info(" MEM 0x%016llx..0x%016llx\n",
-				range.addr, range.addr + range.size - 1);
+				range.cpu_addr,
+				range.cpu_addr + range.size - 1);
 			res = hose->mem_resource;
 		}
 		if (res != NULL)
-- 
1.7.10



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux