02f7e39fb99f9c04b7126f35d964377e58321045
[openwrt.git] / target / linux / ramips / patches-2.6.39 / 950-convert-to-new-irq-functions.patch
1 --- a/arch/mips/ralink/common/intc.c
2 +++ b/arch/mips/ralink/common/intc.c
3 @@ -44,23 +44,25 @@ static inline u32 ramips_intc_rr(unsigne
4 return __raw_readl(ramips_intc_base + reg);
5 }
6
7 -static void ramips_intc_irq_unmask(unsigned int irq)
8 +static void ramips_intc_irq_unmask(struct irq_data *d)
9 {
10 - irq -= ramips_intc_irq_base;
11 + unsigned int irq = d->irq - ramips_intc_irq_base;
12 +
13 ramips_intc_wr((1 << irq), INTC_REG_ENABLE);
14 }
15
16 -static void ramips_intc_irq_mask(unsigned int irq)
17 +static void ramips_intc_irq_mask(struct irq_data *d)
18 {
19 - irq -= ramips_intc_irq_base;
20 + unsigned int irq = d->irq - ramips_intc_irq_base;
21 +
22 ramips_intc_wr((1 << irq), INTC_REG_DISABLE);
23 }
24
25 static struct irq_chip ramips_intc_irq_chip = {
26 .name = "INTC",
27 - .unmask = ramips_intc_irq_unmask,
28 - .mask = ramips_intc_irq_mask,
29 - .mask_ack = ramips_intc_irq_mask,
30 + .irq_unmask = ramips_intc_irq_unmask,
31 + .irq_mask = ramips_intc_irq_mask,
32 + .irq_mask_ack = ramips_intc_irq_mask,
33 };
34
35 static struct irqaction ramips_intc_irqaction = {
36 @@ -83,10 +85,9 @@ void __init ramips_intc_irq_init(unsigne
37 ramips_intc_wr(0, INTC_REG_TYPE);
38
39 for (i = ramips_intc_irq_base;
40 - i < ramips_intc_irq_base + INTC_IRQ_COUNT; i++) {
41 - set_irq_chip_and_handler(i, &ramips_intc_irq_chip,
42 + i < ramips_intc_irq_base + INTC_IRQ_COUNT; i++)
43 + irq_set_chip_and_handler(i, &ramips_intc_irq_chip,
44 handle_level_irq);
45 - }
46
47 setup_irq(irq, &ramips_intc_irqaction);
48 ramips_intc_wr(INTC_INT_GLOBAL, INTC_REG_ENABLE);
This page took 0.052052 seconds and 3 git commands to generate.