aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spider-pic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/cell/spider-pic.c')
-rw-r--r--arch/powerpc/platforms/cell/spider-pic.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c
index 15217bb0402f..742a03282b44 100644
--- a/arch/powerpc/platforms/cell/spider-pic.c
+++ b/arch/powerpc/platforms/cell/spider-pic.c
@@ -240,7 +240,7 @@ static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc,
240static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic) 240static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic)
241{ 241{
242 unsigned int virq; 242 unsigned int virq;
243 u32 *imap, *tmp; 243 const u32 *imap, *tmp;
244 int imaplen, intsize, unit; 244 int imaplen, intsize, unit;
245 struct device_node *iic; 245 struct device_node *iic;
246 struct irq_host *iic_host; 246 struct irq_host *iic_host;
@@ -258,25 +258,25 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic)
258#endif 258#endif
259 259
260 /* Now do the horrible hacks */ 260 /* Now do the horrible hacks */
261 tmp = (u32 *)get_property(pic->of_node, "#interrupt-cells", NULL); 261 tmp = get_property(pic->of_node, "#interrupt-cells", NULL);
262 if (tmp == NULL) 262 if (tmp == NULL)
263 return NO_IRQ; 263 return NO_IRQ;
264 intsize = *tmp; 264 intsize = *tmp;
265 imap = (u32 *)get_property(pic->of_node, "interrupt-map", &imaplen); 265 imap = get_property(pic->of_node, "interrupt-map", &imaplen);
266 if (imap == NULL || imaplen < (intsize + 1)) 266 if (imap == NULL || imaplen < (intsize + 1))
267 return NO_IRQ; 267 return NO_IRQ;
268 iic = of_find_node_by_phandle(imap[intsize]); 268 iic = of_find_node_by_phandle(imap[intsize]);
269 if (iic == NULL) 269 if (iic == NULL)
270 return NO_IRQ; 270 return NO_IRQ;
271 imap += intsize + 1; 271 imap += intsize + 1;
272 tmp = (u32 *)get_property(iic, "#interrupt-cells", NULL); 272 tmp = get_property(iic, "#interrupt-cells", NULL);
273 if (tmp == NULL) 273 if (tmp == NULL)
274 return NO_IRQ; 274 return NO_IRQ;
275 intsize = *tmp; 275 intsize = *tmp;
276 /* Assume unit is last entry of interrupt specifier */ 276 /* Assume unit is last entry of interrupt specifier */
277 unit = imap[intsize - 1]; 277 unit = imap[intsize - 1];
278 /* Ok, we have a unit, now let's try to get the node */ 278 /* Ok, we have a unit, now let's try to get the node */
279 tmp = (u32 *)get_property(iic, "ibm,interrupt-server-ranges", NULL); 279 tmp = get_property(iic, "ibm,interrupt-server-ranges", NULL);
280 if (tmp == NULL) { 280 if (tmp == NULL) {
281 of_node_put(iic); 281 of_node_put(iic);
282 return NO_IRQ; 282 return NO_IRQ;