From 229bf8e13deea2c46d84247f22cc9342edba2933 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 20 Sep 2011 13:02:54 -0500 Subject: [PATCH] --- yaml --- r: 269373 b: refs/heads/master c: dc9372808412edbc653a675a526c2ee6c0c14a91 h: refs/heads/master i: 269371: 60cd8fc3404bbc36ef265e0c10a4be8b1b8bed85 v: v3 --- [refs] | 2 +- trunk/drivers/of/irq.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 5d4fa8d18e15..4d456ccaed34 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f910b831c9647d85dc6f13e3b8698d10cbfd5011 +refs/heads/master: dc9372808412edbc653a675a526c2ee6c0c14a91 diff --git a/trunk/drivers/of/irq.c b/trunk/drivers/of/irq.c index 9f689f1da0fc..6a5b5e777dd2 100644 --- a/trunk/drivers/of/irq.c +++ b/trunk/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; } /**