[PATCH v5 1/6] mfd: fsl imx25 Touchscreen ADC driver

Fabio Estevam festevam at gmail.com
Wed Feb 18 03:57:59 PST 2015


On Wed, Feb 18, 2015 at 6:01 AM, Lee Jones <lee.jones at linaro.org> wrote:
> On Tue, 17 Feb 2015, Fabio Estevam wrote:
>
>> On Mon, Feb 16, 2015 at 11:38 AM, Lee Jones <lee.jones at linaro.org> wrote:
>>
>> >> +static int mx25_tsadc_setup_irq(struct platform_device *pdev,
>> >> +                             struct mx25_tsadc *tsadc)
>> >> +{
>> >> +     struct device *dev = &pdev->dev;
>> >> +     struct device_node *np = dev->of_node;
>> >> +     int irq;
>> >> +
>> >> +     irq = platform_get_irq(pdev, 0);
>> >> +     if (irq < 0) {
>> >
>> > What if 0 is returned?
>>
>> Then  imx25.dtsi would be passing irq=0 for the ADC, which would be
>> totally wrong.
>
> Exactly, so it should be <=.

imx25.dtsi passes interrupts = <46>; for the touch screen controller,
so the irq number will never be zero.



More information about the linux-arm-kernel mailing list