aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-10-05 12:52:27 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-10-05 12:52:27 -0400
commit9514a56753a8d379db36bed424588e1842f2bfcc (patch)
treed13cdfcd9473f521c3b108770dba57e81e557a30 /drivers/of
parent4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4 (diff)
parent6add6967a4a57e2156b96e62f28bcbe1901d16c1 (diff)
Merge branch 'for-grant' of git://git.jdl.com/software/linux-3.0 into devicetree/next
Diffstat (limited to 'drivers/of')
-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 9f689f1da0fc..6a5b5e777dd2 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -58,27 +58,27 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
58 */ 58 */
59struct device_node *of_irq_find_parent(struct device_node *child) 59struct device_node *of_irq_find_parent(struct device_node *child)
60{ 60{
61 struct device_node *p; 61 struct device_node *p, *c = child;
62 const __be32 *parp; 62 const __be32 *parp;
63 63
64 if (!of_node_get(child)) 64 if (!of_node_get(c))
65 return NULL; 65 return NULL;
66 66
67 do { 67 do {
68 parp = of_get_property(child, "interrupt-parent", NULL); 68 parp = of_get_property(c, "interrupt-parent", NULL);
69 if (parp == NULL) 69 if (parp == NULL)
70 p = of_get_parent(child); 70 p = of_get_parent(c);
71 else { 71 else {
72 if (of_irq_workarounds & OF_IMAP_NO_PHANDLE) 72 if (of_irq_workarounds & OF_IMAP_NO_PHANDLE)
73 p = of_node_get(of_irq_dflt_pic); 73 p = of_node_get(of_irq_dflt_pic);
74 else 74 else
75 p = of_find_node_by_phandle(be32_to_cpup(parp)); 75 p = of_find_node_by_phandle(be32_to_cpup(parp));
76 } 76 }
77 of_node_put(child); 77 of_node_put(c);
78 child = p; 78 c = p;
79 } while (p && of_get_property(p, "#interrupt-cells", NULL) == NULL); 79 } while (p && of_get_property(p, "#interrupt-cells", NULL) == NULL);
80 80
81 return p; 81 return (p == child) ? NULL : p;
82} 82}
83 83
84/** 84/**