powerpc/kernel: Fix endian issue in rtas_pci

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Cedric Le Goater 2013-09-23 14:17:54 +02:00 committed by Benjamin Herrenschmidt
parent a489043f46
commit cf05996571
1 changed files with 3 additions and 3 deletions

View File

@ -223,7 +223,7 @@ unsigned long get_phb_buid(struct device_node *phb)
static int phb_set_bus_ranges(struct device_node *dev, static int phb_set_bus_ranges(struct device_node *dev,
struct pci_controller *phb) struct pci_controller *phb)
{ {
const int *bus_range; const __be32 *bus_range;
unsigned int len; unsigned int len;
bus_range = of_get_property(dev, "bus-range", &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; return 1;
} }
phb->first_busno = bus_range[0]; phb->first_busno = be32_to_cpu(bus_range[0]);
phb->last_busno = bus_range[1]; phb->last_busno = be32_to_cpu(bus_range[1]);
return 0; return 0;
} }