VT8500 chained controller can route its interrupts to either or all
of its 8 interrupt outputs. Current code actually routes all of them
to the first output, so there is no need to create mappings for all
eight.
Drop redundant checks, and only map as many chained controller
interrupts as are defined in the device tree.
Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250506-vt8500-intc-updates-v2-3-a3a0606cf92d@gmail.com
active_cnt++;
- /* check if this is a slaved controller */
+ /* check if this is a chained controller */
if (of_irq_count(node) != 0) {
- /* check that we have the correct number of interrupts */
- if (of_irq_count(node) != 8) {
- pr_err("%s: Incorrect IRQ map for slaved controller\n",
- __func__);
- return -EINVAL;
- }
-
- for (i = 0; i < 8; i++) {
+ for (i = 0; i < of_irq_count(node); i++) {
irq = irq_of_parse_and_map(node, i);
enable_irq(irq);
}