summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/rtas_pci.c
diff options
context:
space:
mode:
authorCedric Le Goater <clg@fr.ibm.com>2013-09-23 14:17:54 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-10-11 07:50:22 +0200
commitcf059965713b71b7301fd88f1e98b31c6484dd46 (patch)
treea7d9f69f79db9d114dfffa6513f51ed5373ba10c /arch/powerpc/kernel/rtas_pci.c
parentpowerpc/pseries: Implement arch_get_random_long() based on H_RANDOM (diff)
downloadlinux-cf059965713b71b7301fd88f1e98b31c6484dd46.tar.xz
linux-cf059965713b71b7301fd88f1e98b31c6484dd46.zip
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>
Diffstat (limited to 'arch/powerpc/kernel/rtas_pci.c')
-rw-r--r--arch/powerpc/kernel/rtas_pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 6e7b7cdeec65..7d4c7172f38e 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -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;
}