Changeset 34546


Ignore:
Timestamp:
2012-12-06T23:39:27+01:00 (5 years ago)
Author:
florian
Message:

[adm8668] simplify IRQ controller code

Signed-off-by: Florian Fainelli <florian@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/adm8668/files/arch/mips/adm8668/irq.c

    r31497 r34546  
    5353static void enable_adm8668_irq(struct irq_data *d) 
    5454{ 
    55         int irq = d->irq; 
    56  
    57         if ((irq < 0) || (irq > NR_IRQS)) 
    58                 return; 
    59  
    60         ADM8668_INTC_REG(IRQ_ENABLE_REG) = (1 << irq); 
     55        ADM8668_INTC_REG(IRQ_ENABLE_REG) = (1 << d->irq); 
    6156} 
    6257 
    6358 
    64 /* 
    65  * disable 8668 irq 
    66  */ 
    67 static void disable_adm8668_irq(struct irq_data *d) 
    68 { 
    69         int irq = d->irq; 
    70  
    71         if ((irq < 0) || (irq > NR_IRQS)) 
    72                 return; 
    73  
    74         ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << irq); 
    75 } 
    76  
    7759static void ack_adm8668_irq(struct irq_data *d) 
    7860{ 
    79         int irq = d->irq; 
    80  
    81         ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << irq); 
     61        ADM8668_INTC_REG(IRQ_DISABLE_REG) = (1 << d->irq); 
    8262} 
    8363 
     
    8969        .name = "adm8668", 
    9070        .irq_ack = ack_adm8668_irq, 
    91         .irq_mask = disable_adm8668_irq, 
     71        .irq_mask = ack_adm8668_irq, 
    9272        .irq_unmask = enable_adm8668_irq 
    9373}; 
Note: See TracChangeset for help on using the changeset viewer.