Skip to contentSkip to conversation

powerpc/kernel: fix endian issue in rtas_pci

PATCH New Cédric Le Goater 1 participant 1 message Sep 23, 2013 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/kernel: fix endian issue in rtas_pci

---
 arch/powerpc/kernel/rtas_pci.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/kernel/rtas_pci.c +3 -3
index 6e7b7cd..7d4c717 100644
@@ -223,7 +223,7 @@ unsigned long get_phb_buid(struct device_node *phb)
 static int phb_set_bus_ranges(struct device_node *dev,
 			      struct pci_controller *phb)
 {
-	const int *bus_range;
+	const __be32 *bus_range;
 	unsigned int len;
 
 	bus_range = of_get_property(dev, "bus-range", &len);
@@ -231,8 +231,8 @@ static int phb_set_bus_ranges(struct device_node *dev,
 		return 1;
  	}
 
-	phb->first_busno =  bus_range[0];
-	phb->last_busno  =  bus_range[1];
+	phb->first_busno = be32_to_cpu(bus_range[0]);
+	phb->last_busno  = be32_to_cpu(bus_range[1]);
 
 	return 0;
 }
Signature · 1 line
1.7.10.4