From a891b393dd7f6ed84ecee98c0eac4a808ff2cbbc Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 14 Oct 2010 22:31:25 -0400 Subject: alpha: irq clean up Stop touching irq_desc[irq] directly, instead use accessor functions provided. Use irq_has_action instead of directly testing the irq_desc. Tested-by: Michael Cree Signed-off-by: Kyle McMartin Signed-off-by: Matt Turner --- arch/alpha/kernel/irq_alpha.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'arch/alpha/kernel/irq_alpha.c') diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index 4c8bb374eb0a..1b2c8bb81460 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c @@ -241,9 +241,13 @@ static struct irq_chip rtc_irq_type = { void __init init_rtc_irq(void) { - irq_desc[RTC_IRQ].status = IRQ_DISABLED; - irq_desc[RTC_IRQ].chip = &rtc_irq_type; - setup_irq(RTC_IRQ, &timer_irqaction); + struct irq_desc *desc = irq_to_desc(RTC_IRQ); + + if (desc) { + desc->status |= IRQ_DISABLED; + set_irq_chip(RTC_IRQ, &rtc_irq_type); + setup_irq(RTC_IRQ, &timer_irqaction); + } } /* Dummy irqactions. */ -- cgit v1.2.3-59-g8ed1b