]> git.baikalelectronics.ru Git - kernel.git/commit
of/irq: of_irq_find_parent: check for parent equal to child
authorRob Herring <rob.herring@calxeda.com>
Tue, 20 Sep 2011 18:02:54 +0000 (13:02 -0500)
committerRob Herring <rob.herring@calxeda.com>
Wed, 5 Oct 2011 12:39:37 +0000 (07:39 -0500)
commit3d4830da960515cad71a3bae335ca55a65693172
tree5c6a2252c1de2720e7783a48f5b144003176cf65
parent57693b53a7048de41cb669189e6367e3e9dc4550
of/irq: of_irq_find_parent: check for parent equal to child

An interrupt controller may often implicitly inherit itself from a parent
node when in fact the controller is the interrupt root controller. Guard
against the case of child == parent and return NULL in this case.

This can also be fixed by adding an explicit "interrupt-parent;" to a root
interrupt controller node.

Based on code from Grant Likely.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
drivers/of/irq.c