]> git.karo-electronics.de Git - karo-tx-linux.git/commit
of/irq: introduce of_irq_init
authorRob Herring <rob.herring@calxeda.com>
Tue, 20 Sep 2011 20:13:50 +0000 (15:13 -0500)
committerArnd Bergmann <arnd@arndb.de>
Thu, 20 Oct 2011 15:58:28 +0000 (17:58 +0200)
commit6b2a65ff17691de4192bc375612b9c43310aa388
tree19dc25303c99a111e9d7ef9e977b5e35297758f5
parent18eef8d2b6ebd00ad0ac87c9b0154c1f3fe73d6e
of/irq: introduce of_irq_init

of_irq_init will scan the devicetree for matching interrupt controller
nodes. Then it calls an initialization function for each found controller
in the proper order with parent nodes initialized before child nodes.

Based on initial pseudo code from Grant Likely.

Changes in v4:
- Drop unnecessary empty list check
- Be more verbose on errors
- Simplify "if (!desc) WARN_ON(1)" to "if (WARN_ON(!desc))"

Changes in v3:
- add missing kfree's found by Jamie
- Implement Grant's comments to simplify the init loop
- fix function comments

Changes in v2:
- Complete re-write of list searching code from Grant Likely

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Tested-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
drivers/of/irq.c
include/linux/of_irq.h