[lkml]   [2011]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] spi_imx.c: correct the test on platform_get_irq() return value
2011/1/7 Grant Likely <>:
> On Fri, Jan 7, 2011 at 7:26 AM, Richard Genoud <> wrote:
>> The test "if (spi_imx->irq <= 0)" is not testing the IRQ value, but the return value of platform_get_irq().
>> As platform_get_irq() can return an error (-ENXIO) or the IRQ value it found, the test should be "if (spi_imx->irq < 0)"
>> Signed-off-by: Richard Genoud <>
> For the majority of architectures in Linux, 0 is not a valid IRQ for
> devices.  Unless there is an actual imx platform that currently
> assigns linux irq 0 to the spi controller then I'd rather not apply
> this change.
actually, there is the imx25 platform:
in arch/arm/plat-mxc/include/mach/mx25.h
line 61 :
#define MX25_INT_CSPI3 0
this is the interrupt assigned for CSPI3.

I doubled check with the imx25 release manual chapter 3.1 (page 51):
And I made some spi test on the imx25 3stack PDK, the CSPI3 is working
with irq 0.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2011-01-07 17:45    [W:0.085 / U:2.084 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site