diff options
-rw-r--r-- | drivers/of/irq.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 6d3dd3988d0f..791270b8bd1c 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
@@ -60,27 +60,27 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map); | |||
60 | */ | 60 | */ |
61 | struct device_node *of_irq_find_parent(struct device_node *child) | 61 | struct device_node *of_irq_find_parent(struct device_node *child) |
62 | { | 62 | { |
63 | struct device_node *p, *c = child; | 63 | struct device_node *p; |
64 | const __be32 *parp; | 64 | const __be32 *parp; |
65 | 65 | ||
66 | if (!of_node_get(c)) | 66 | if (!of_node_get(child)) |
67 | return NULL; | 67 | return NULL; |
68 | 68 | ||
69 | do { | 69 | do { |
70 | parp = of_get_property(c, "interrupt-parent", NULL); | 70 | parp = of_get_property(child, "interrupt-parent", NULL); |
71 | if (parp == NULL) | 71 | if (parp == NULL) |
72 | p = of_get_parent(c); | 72 | p = of_get_parent(child); |
73 | else { | 73 | else { |
74 | if (of_irq_workarounds & OF_IMAP_NO_PHANDLE) | 74 | if (of_irq_workarounds & OF_IMAP_NO_PHANDLE) |
75 | p = of_node_get(of_irq_dflt_pic); | 75 | p = of_node_get(of_irq_dflt_pic); |
76 | else | 76 | else |
77 | p = of_find_node_by_phandle(be32_to_cpup(parp)); | 77 | p = of_find_node_by_phandle(be32_to_cpup(parp)); |
78 | } | 78 | } |
79 | of_node_put(c); | 79 | of_node_put(child); |
80 | c = p; | 80 | child = p; |
81 | } while (p && of_get_property(p, "#interrupt-cells", NULL) == NULL); | 81 | } while (p && of_get_property(p, "#interrupt-cells", NULL) == NULL); |
82 | 82 | ||
83 | return (p == child) ? NULL : p; | 83 | return p; |
84 | } | 84 | } |
85 | 85 | ||
86 | /** | 86 | /** |