Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c | Date | Thu, 4 Oct 2012 07:12:48 +0000 |
| |
On Thursday 04 October 2012, Fabio Estevam wrote: > +static int da9052_map_irq(struct da9052 *da9052, int irq) > +{ > + return regmap_irq_get_virq(da9052->irq_data, irq); > +} > + > +int da9052_enable_irq(struct da9052 *da9052, int irq) > +{ > + irq = da9052_map_irq(da9052, irq); > + if (irq < 0) > + return irq; > + > + enable_irq(irq); > + > + return 0; > +} > +EXPORT_SYMBOL_GPL(da9052_enable_irq);
This looks correct, but I'm not sure it's actually simpler than letting the sub-drivers deal with calling regmap_irq_get_virq().
Can't each driver just call regmap_irq_get_virq once at init time and then call the regular irq management functions?
Maybe I just don't see the real purpose of these functions. If I'm contradicting what Mark said, listen to him instead.
Arnd
| |