score: Convert irq_chip to new functions

Use the proper accessor functions in show_interrupts() while at it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Chen Liqin <liqin.chen@sunplusct.com>

authored by Thomas Gleixner and committed by Chen Liqin 7182297e 16c29daf

+13 -11
+13 -11
arch/score/kernel/irq.c
··· 52 52 irq_exit(); 53 53 } 54 54 55 - static void score_mask(unsigned int irq_nr) 55 + static void score_mask(struct irq_data *d) 56 56 { 57 - unsigned int irq_source = 63 - irq_nr; 57 + unsigned int irq_source = 63 - d->irq; 58 58 59 59 if (irq_source < 32) 60 60 __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) | \ ··· 64 64 (1 << (irq_source - 32))), SCORE_PIC + INT_MASKH); 65 65 } 66 66 67 - static void score_unmask(unsigned int irq_nr) 67 + static void score_unmask(struct irq_data *d) 68 68 { 69 - unsigned int irq_source = 63 - irq_nr; 69 + unsigned int irq_source = 63 - d->irq; 70 70 71 71 if (irq_source < 32) 72 72 __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) & \ ··· 78 78 79 79 struct irq_chip score_irq_chip = { 80 80 .name = "Score7-level", 81 - .mask = score_mask, 82 - .mask_ack = score_mask, 83 - .unmask = score_unmask, 81 + .irq_mask = score_mask, 82 + .irq_mask_ack = score_mask, 83 + .irq_unmask = score_unmask, 84 84 }; 85 85 86 86 /* ··· 127 127 } 128 128 129 129 if (i < NR_IRQS) { 130 - spin_lock_irqsave(&irq_desc[i].lock, flags); 131 - action = irq_desc[i].action; 130 + struct irq_desc *desc = irq_to_desc(i); 131 + 132 + raw_spin_lock_irqsave(&desc->lock, flags); 133 + action = desc->action; 132 134 if (!action) 133 135 goto unlock; 134 136 135 137 seq_printf(p, "%3d: ", i); 136 138 seq_printf(p, "%10u ", kstat_irqs(i)); 137 - seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-"); 139 + seq_printf(p, " %8s", get_irq_desc_chip(desc)->name ? : "-"); 138 140 seq_printf(p, " %s", action->name); 139 141 for (action = action->next; action; action = action->next) 140 142 seq_printf(p, ", %s", action->name); 141 143 142 144 seq_putc(p, '\n'); 143 145 unlock: 144 - spin_unlock_irqrestore(&irq_desc[i].lock, flags); 146 + raw_spin_unlock_irqrestore(&desc->lock, flags); 145 147 } 146 148 147 149 return 0;