提交 d0abe2f3 编写于 作者: J Jiang Liu 提交者: Ingo Molnar

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: NJiang Liu <jiang.liu@linux.intel.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Link: http://lkml.kernel.org/r/20150713151626.616384365@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NIngo Molnar <mingo@kernel.org>
上级 cde5c275
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册