(resend because I forgot to cc the mailing list) 2009/12/9 Uwe Kleine-König <[email protected]>: > Hello Grant, > > On Tue, Dec 08, 2009 at 05:38:57PM -0700, Grant Likely wrote: >> > diff -puN >> > drivers/spi/spi_imx.c~spi-imx-correct-check-for-platform_get_irq-failing >> > drivers/spi/spi_imx.c >> > --- >> > a/drivers/spi/spi_imx.c~spi-imx-correct-check-for-platform_get_irq-failing >> > +++ a/drivers/spi/spi_imx.c >> > @@ -554,7 +554,7 @@ static int __init spi_imx_probe(struct p >> > } >> > >> > spi_imx->irq = platform_get_irq(pdev, 0); >> > - if (!spi_imx->irq) { >> > + if (spi_imx->irq < 0) { >> >> This changes the old behaviour. Is that what you intended? '<= 0' perhaps? > Yes, the old check was wrong. What if the irq to use is 0? I thought > the commit log to be understandable. platform_get_irq returns -ENXIO on > error and an irq number on success. So 0 has to be interpreted as valid > irq, not an error.
0 is not a valid IRQ g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general
