Commit 63111a3a70fb4d80e3b54ed75f13795e98f7a467
1 parent
fb41a49d96
Exists in
master
and in
4 other branches
sh: intc: switch irq_desc iteration to new active IRQ iterator.
There's no need to iterative over every single irq_desc when we can already work out which IRQs have a backing descriptor via the shiny new for_each_active_irq(). Switch to that instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Showing 1 changed file with 2 additions and 8 deletions Side-by-side Diff
drivers/sh/intc/core.c
... | ... | @@ -403,11 +403,8 @@ |
403 | 403 | if (d->state.event != PM_EVENT_FREEZE) |
404 | 404 | break; |
405 | 405 | |
406 | - for_each_irq_nr(irq) { | |
406 | + for_each_active_irq(irq) { | |
407 | 407 | desc = irq_to_desc(irq); |
408 | - if (!desc) | |
409 | - continue; | |
410 | - | |
411 | 408 | data = irq_get_irq_data(irq); |
412 | 409 | chip = irq_data_get_irq_chip(data); |
413 | 410 | |
414 | 411 | |
... | ... | @@ -428,11 +425,8 @@ |
428 | 425 | break; |
429 | 426 | case PM_EVENT_SUSPEND: |
430 | 427 | /* enable wakeup irqs belonging to this intc controller */ |
431 | - for_each_irq_nr(irq) { | |
428 | + for_each_active_irq(irq) { | |
432 | 429 | desc = irq_to_desc(irq); |
433 | - if (!desc) | |
434 | - continue; | |
435 | - | |
436 | 430 | data = irq_get_irq_data(irq); |
437 | 431 | chip = irq_data_get_irq_chip(data); |
438 | 432 |