Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c

From: Arnd Bergmann
Date: Thu Oct 04 2012 - 03:12:50 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/