Re: [i2c] [PATCH 19 3/5] Clean up error returns

2008-01-21 Thread Benjamin Herrenschmidt
On Sun, 2008-01-20 at 10:18 -0500, Jon Smirl wrote: > > So it seems to me like the polling mode code is never actually used? > > Unless some platforms include an "empty" IRQ in their device > > definition. Which indeed seems to be the case... but then they set > the > > IRQ to 0, NOT to NO_IRQ, so

Re: [i2c] [PATCH 19 3/5] Clean up error returns

2008-01-21 Thread Benjamin Herrenschmidt
On Mon, 2008-01-21 at 17:10 +0100, Jean Delvare wrote: > Hi Jon, > > On Sun, 20 Jan 2008 10:39:43 -0500, Jon Smirl wrote: > > Here' s a version with the compares to zero switched to NO_IRQ. If I > > understand how NO_IRQ works it is the correct change. My understanding > > is that under ppc IRQ z

Re: [i2c] [PATCH 19 3/5] Clean up error returns

2008-01-21 Thread Jean Delvare
Hi Jon, On Sun, 20 Jan 2008 10:39:43 -0500, Jon Smirl wrote: > Here' s a version with the compares to zero switched to NO_IRQ. If I > understand how NO_IRQ works it is the correct change. My understanding > is that under ppc IRQ zero was legal and NO_IRQ was -1. But then the > whole kernel switche

Re: [i2c] [PATCH 19 3/5] Clean up error returns

2008-01-20 Thread Jon Smirl
Here' s a version with the compares to zero switched to NO_IRQ. If I understand how NO_IRQ works it is the correct change. My understanding is that under ppc IRQ zero was legal and NO_IRQ was -1. But then the whole kernel switched to NO_IRQ = zero. Powerpc updated to NO_IRQ=0 and used virtual IRQs

Re: [i2c] [PATCH 19 3/5] Clean up error returns

2008-01-20 Thread Jon Smirl
On 1/20/08, Jean Delvare <[EMAIL PROTECTED]> wrote: > > @@ -381,7 +385,7 @@ static int fsl_i2c_remove(struct platform_device *pdev) > > i2c_del_adapter(&i2c->adap); > > platform_set_drvdata(pdev, NULL); > > > > - if (i2c->irq != 0) > > + if (i2c->irq != NO_IRQ) > >

Re: [i2c] [PATCH 19 3/5] Clean up error returns

2008-01-20 Thread Jean Delvare
Hi Jon, On Fri, 11 Jan 2008 21:47:43 -0500, Jon Smirl wrote: > Return errors that were being ignored in the mpc-i2c driver This wording is a bit excessive. The errors were not being ignored, only the error code was replaced with a less informative -1. Still, that's a good fix, although totally un