summaryrefslogtreecommitdiff
path: root/drivers/of/irq.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-01-12 12:50:11 +0000
committerLee Jones <lee.jones@linaro.org>2012-01-12 12:50:11 +0000
commit72108d578689febd3579bf16be470328ded6c6d9 (patch)
treecc36ad5306ce823f8e98956c8f048f48017be3cc /drivers/of/irq.c
parent330f78a83c1f47055427e10a68733af77b2cbac8 (diff)
parent2150f72fe35397cc6d6ce39866bd0462cfbcc916 (diff)
Automatically merging tracking-igloo_kernel-other into merging-stable-linaro-ux500-3.1stable-linaro-ux500-3.1
Conflicting files:
Diffstat (limited to 'drivers/of/irq.c')
-rw-r--r--drivers/of/irq.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 9f689f1da0f..6a5b5e777dd 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -58,27 +58,27 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
*/
struct device_node *of_irq_find_parent(struct device_node *child)
{
- struct device_node *p;
+ struct device_node *p, *c = child;
const __be32 *parp;
- if (!of_node_get(child))
+ if (!of_node_get(c))
return NULL;
do {
- parp = of_get_property(child, "interrupt-parent", NULL);
+ parp = of_get_property(c, "interrupt-parent", NULL);
if (parp == NULL)
- p = of_get_parent(child);
+ p = of_get_parent(c);
else {
if (of_irq_workarounds & OF_IMAP_NO_PHANDLE)
p = of_node_get(of_irq_dflt_pic);
else
p = of_find_node_by_phandle(be32_to_cpup(parp));
}
- of_node_put(child);
- child = p;
+ of_node_put(c);
+ c = p;
} while (p && of_get_property(p, "#interrupt-cells", NULL) == NULL);
- return p;
+ return (p == child) ? NULL : p;
}
/**