of/irq: Rework of_irq_count()
of/irq: Rework of_irq_count()

The of_irq_to_resource() helper that is used to implement of_irq_count()
tries to resolve interrupts and in fact creates a mapping for resolved
interrupts. That's pretty heavy lifting for something that claims to
just return the number of interrupts requested by a given device node.

Instead, use the more lightweight of_irq_map_one(), which, despite the
name, doesn't create an actual mapping. Perhaps a better name would be
of_irq_translate_one().

Signed-off-by: Thierry Reding <3055038c414aef68bf32c33b8118623e7554e0f2@nvidia.com>
Acked-by: Rob Herring <aa00819e304141d872f2e4b1c4be422ea3abbfe1@calxeda.com>
[grant.likely: fixup s/of_irq_map_one/of_irq_parse_one/]
Signed-off-by: Grant Likely <9069e6f5a2b566e2674a0ba1e2bf39c12c195fad@linaro.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs