Re: [PATCH v2] mfd: da9052-core: Use regmap_irq_get_virq() and fixthe probe

From: Mark Brown
Date: Fri Sep 28 2012 - 06:49:38 EST


On Thu, Sep 27, 2012 at 10:57:38PM -0300, Fabio Estevam wrote:

> - da9052->irq_base = regmap_irq_chip_get_base(da9052->irq_data);
> + da9052->irq = regmap_irq_get_virq(da9052->irq_data, DA9052_IRQ_ADC_EOM);
>
> - ret = request_threaded_irq(DA9052_IRQ_ADC_EOM, NULL, da9052_auxadc_irq,
> + if (da9052->irq < 0) {
> + ret = da9052->irq;
> + dev_err(da9052->dev, "regmap_irq_get_virq failed: %d\n", ret);
> + goto regmap_err;
> + }
> +
> + ret = request_threaded_irq(da9052->irq, NULL, da9052_auxadc_irq,

This will fix the problem but the usage of da9052->irq here is very odd,
normally that'd be the primary IRQ for the device but this is actually
just the interrupt for the ADC.

Otherwise

Reviwed-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
--
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/