aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-24 10:44:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-24 10:44:58 -0400
commitf8c3301e8336334be62527c5314018f75f58ad4b (patch)
tree1eb819381e0858a03fe544dc40cf4661adf683bf /arch/powerpc/kernel
parent437f7fdb607f32b737e4da9f14bebcfdac2c90c3 (diff)
parent6329db8bd60fbc0832f30c350b0181b8d865573e (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: powerpc: Fix modular build of ide-pmac when mediabay is built in powerpc/pasemi: Fix build error on UP powerpc: Make macintosh/mediabay driver depend on CONFIG_BLOCK maintainers: Fix PS3 patterns powerpc/ps3: Fix CONFIG_PS3_FLASH=n build warning powerpc/32: Don't clobber personality flags on exec powerpc: Fix crash on CPU hotplug powerpc/85xx: Remove defconfigs that mpc85xx_{smp_}defconfig cover powerpc/85xx: Added SMP defconfig powerpc/85xx: Enabled a bunch of FSL specific drivers/options powerpc/85xx: Updated generic mpc85xx_defconfig powerpc: don't disable SATA interrupts on Freescale MPC8610 HPCD fsl_rio: Pass the proper device to dma mapping routines powerpc: Fix of_node_put() exit path in of_irq_map_one() powerpc/5200: defconfig updates powerpc/5200: Add FLASH nodes to lite5200 device tree powerpc/device-tree: Document MTD nodes with multiple "reg" tuples powerpc/of-device-tree: Factor MTD physmap bindings out of booting-without-of powerpc/5200: Bring the legacy fsl_spi_platform_data hooks back
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/prom_parse.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 8f0856f312d..8362620c9e6 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -971,7 +971,7 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
971 struct device_node *p; 971 struct device_node *p;
972 const u32 *intspec, *tmp, *addr; 972 const u32 *intspec, *tmp, *addr;
973 u32 intsize, intlen; 973 u32 intsize, intlen;
974 int res; 974 int res = -EINVAL;
975 975
976 DBG("of_irq_map_one: dev=%s, index=%d\n", device->full_name, index); 976 DBG("of_irq_map_one: dev=%s, index=%d\n", device->full_name, index);
977 977
@@ -995,21 +995,20 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
995 995
996 /* Get size of interrupt specifier */ 996 /* Get size of interrupt specifier */
997 tmp = of_get_property(p, "#interrupt-cells", NULL); 997 tmp = of_get_property(p, "#interrupt-cells", NULL);
998 if (tmp == NULL) { 998 if (tmp == NULL)
999 of_node_put(p); 999 goto out;
1000 return -EINVAL;
1001 }
1002 intsize = *tmp; 1000 intsize = *tmp;
1003 1001
1004 DBG(" intsize=%d intlen=%d\n", intsize, intlen); 1002 DBG(" intsize=%d intlen=%d\n", intsize, intlen);
1005 1003
1006 /* Check index */ 1004 /* Check index */
1007 if ((index + 1) * intsize > intlen) 1005 if ((index + 1) * intsize > intlen)
1008 return -EINVAL; 1006 goto out;
1009 1007
1010 /* Get new specifier and map it */ 1008 /* Get new specifier and map it */
1011 res = of_irq_map_raw(p, intspec + index * intsize, intsize, 1009 res = of_irq_map_raw(p, intspec + index * intsize, intsize,
1012 addr, out_irq); 1010 addr, out_irq);
1011out:
1013 of_node_put(p); 1012 of_node_put(p);
1014 return res; 1013 return res;
1015} 1014}