mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
sh/irq: Use irq accessor functions instead of open coded access
This is a preparatory patch for refactoring the internals if irq_data. Signed-off-by: Jiang Liu <[email protected]> Cc: Simon Horman <[email protected]> Cc: Magnus Damm <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
cde5c27568
commit
d0abe2f3a9
1 changed files with 7 additions and 5 deletions
|
|
@ -83,12 +83,11 @@ EXPORT_SYMBOL_GPL(intc_irq_lookup);
|
|||
|
||||
static int add_virq_to_pirq(unsigned int irq, unsigned int virq)
|
||||
{
|
||||
struct intc_virq_list **last, *entry;
|
||||
struct irq_data *data = irq_get_irq_data(irq);
|
||||
struct intc_virq_list *entry;
|
||||
struct intc_virq_list **last = NULL;
|
||||
|
||||
/* scan for duplicates */
|
||||
last = (struct intc_virq_list **)&data->handler_data;
|
||||
for_each_virq(entry, data->handler_data) {
|
||||
for_each_virq(entry, irq_get_handler_data(irq)) {
|
||||
if (entry->irq == virq)
|
||||
return 0;
|
||||
last = &entry->next;
|
||||
|
|
@ -102,7 +101,10 @@ static int add_virq_to_pirq(unsigned int irq, unsigned int virq)
|
|||
|
||||
entry->irq = virq;
|
||||
|
||||
*last = entry;
|
||||
if (last)
|
||||
*last = entry;
|
||||
else
|
||||
irq_set_handler_data(irq, entry);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue