mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
irqchip/atmel-aic: Change return type of aic_common_set_priority()
Priority validation is not necessary because aic_common_irq_domain_xlate() already handles it. With this removal, return type can be changed to void. Signed-off-by: Milo Kim <[email protected]> Acked-by: Boris Brezillon <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Ludovic Desroches <[email protected]> Cc: Nicholas Ferre <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
dd85c79150
commit
5fd26a0bb1
4 changed files with 6 additions and 14 deletions
|
|
@ -80,16 +80,10 @@ int aic_common_set_type(struct irq_data *d, unsigned type, unsigned *val)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int aic_common_set_priority(int priority, unsigned *val)
|
||||
void aic_common_set_priority(int priority, unsigned *val)
|
||||
{
|
||||
if (priority < AT91_AIC_IRQ_MIN_PRIORITY ||
|
||||
priority > AT91_AIC_IRQ_MAX_PRIORITY)
|
||||
return -EINVAL;
|
||||
|
||||
*val &= ~AT91_AIC_PRIOR;
|
||||
*val |= priority;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int aic_common_irq_domain_xlate(struct irq_domain *d,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
int aic_common_set_type(struct irq_data *d, unsigned type, unsigned *val);
|
||||
|
||||
int aic_common_set_priority(int priority, unsigned *val);
|
||||
void aic_common_set_priority(int priority, unsigned *val);
|
||||
|
||||
int aic_common_irq_domain_xlate(struct irq_domain *d,
|
||||
struct device_node *ctrlr,
|
||||
|
|
|
|||
|
|
@ -196,9 +196,8 @@ static int aic_irq_domain_xlate(struct irq_domain *d,
|
|||
|
||||
irq_gc_lock(gc);
|
||||
smr = irq_reg_readl(gc, AT91_AIC_SMR(*out_hwirq));
|
||||
ret = aic_common_set_priority(intspec[2], &smr);
|
||||
if (!ret)
|
||||
irq_reg_writel(gc, smr, AT91_AIC_SMR(*out_hwirq));
|
||||
aic_common_set_priority(intspec[2], &smr);
|
||||
irq_reg_writel(gc, smr, AT91_AIC_SMR(*out_hwirq));
|
||||
irq_gc_unlock(gc);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -272,9 +272,8 @@ static int aic5_irq_domain_xlate(struct irq_domain *d,
|
|||
irq_gc_lock(bgc);
|
||||
irq_reg_writel(bgc, *out_hwirq, AT91_AIC5_SSR);
|
||||
smr = irq_reg_readl(bgc, AT91_AIC5_SMR);
|
||||
ret = aic_common_set_priority(intspec[2], &smr);
|
||||
if (!ret)
|
||||
irq_reg_writel(bgc, intspec[2] | smr, AT91_AIC5_SMR);
|
||||
aic_common_set_priority(intspec[2], &smr);
|
||||
irq_reg_writel(bgc, intspec[2] | smr, AT91_AIC5_SMR);
|
||||
irq_gc_unlock(bgc);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue