* Delete NO_IRQ usage from I2C subsystem
@ 2010-04-02 0:16 Wolfram Sang
[not found] ` <1270167421-5205-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Wolfram Sang @ 2010-04-02 0:16 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, Ben Dooks
This is a resend of my patch series from October (rebased). Only Grant's acks
have been added. Further explanation in the patches itself. Ben, can you pick
them up or tell Grant to do so?
Kind regards,
Wolfram
^ permalink raw reply [flat|nested] 9+ messages in thread[parent not found: <1270167421-5205-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* [PATCH RESEND 1/3] i2c/mpc: drop NO_IRQ [not found] ` <1270167421-5205-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2010-04-02 0:16 ` Wolfram Sang 2010-04-02 0:17 ` [PATCH RESEND 2/3] i2c/cpm: " Wolfram Sang 2010-04-02 0:17 ` [PATCH RESEND 3/3] i2c/ibm-iic: " Wolfram Sang 2 siblings, 0 replies; 9+ messages in thread From: Wolfram Sang @ 2010-04-02 0:16 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, Ben Dooks, Wolfram Sang Drop NO_IRQ as 0 is the preferred way to describe 'no irq' (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is only used on powerpc, where NO_IRQ is 0 anyhow. Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org> --- drivers/i2c/busses/i2c-mpc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index 78a15af..72a26a2 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c @@ -117,7 +117,7 @@ static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing) u32 x; int result = 0; - if (i2c->irq == NO_IRQ) { + if (!i2c->irq) { while (!(readb(i2c->base + MPC_I2C_SR) & CSR_MIF)) { schedule(); if (time_after(jiffies, orig_jiffies + timeout)) { @@ -567,7 +567,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op, } i2c->irq = irq_of_parse_and_map(op->node, 0); - if (i2c->irq != NO_IRQ) { /* i2c->irq = NO_IRQ implies polling */ + if (i2c->irq) { /* no i2c->irq implies polling */ result = request_irq(i2c->irq, mpc_i2c_isr, IRQF_SHARED, "i2c-mpc", i2c); if (result < 0) { @@ -626,7 +626,7 @@ static int __devexit fsl_i2c_remove(struct of_device *op) i2c_del_adapter(&i2c->adap); dev_set_drvdata(&op->dev, NULL); - if (i2c->irq != NO_IRQ) + if (i2c->irq) free_irq(i2c->irq, i2c); irq_dispose_mapping(i2c->irq); -- 1.7.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH RESEND 2/3] i2c/cpm: drop NO_IRQ [not found] ` <1270167421-5205-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2010-04-02 0:16 ` [PATCH RESEND 1/3] i2c/mpc: drop NO_IRQ Wolfram Sang @ 2010-04-02 0:17 ` Wolfram Sang [not found] ` <1270167421-5205-3-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2010-04-02 0:17 ` [PATCH RESEND 3/3] i2c/ibm-iic: " Wolfram Sang 2 siblings, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2010-04-02 0:17 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, Ben Dooks, Wolfram Sang, Jochen Friedrich Drop NO_IRQ as 0 is the preferred way to describe 'no irq' (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is only used on powerpc, where NO_IRQ is 0 anyhow. Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> Cc: Jochen Friedrich <jochen-NIgtFMG+Po8@public.gmane.org> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org> --- drivers/i2c/busses/i2c-cpm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index 9c2e100..16948db 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c @@ -441,7 +441,7 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) init_waitqueue_head(&cpm->i2c_wait); cpm->irq = of_irq_to_resource(ofdev->node, 0, NULL); - if (cpm->irq == NO_IRQ) + if (!cpm->irq) return -EINVAL; /* Install interrupt handler. */ -- 1.7.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
[parent not found: <1270167421-5205-3-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: [PATCH RESEND 2/3] i2c/cpm: drop NO_IRQ [not found] ` <1270167421-5205-3-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2010-04-02 11:34 ` Jochen Friedrich 0 siblings, 0 replies; 9+ messages in thread From: Jochen Friedrich @ 2010-04-02 11:34 UTC (permalink / raw) To: Wolfram Sang Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, Ben Dooks Wolfram Sang wrote: > Drop NO_IRQ as 0 is the preferred way to describe 'no irq' > Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> > Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> Acked-by: Jochen Friedrich <jochen-NIgtFMG+Po8@public.gmane.org> Thanks, Jochen ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH RESEND 3/3] i2c/ibm-iic: drop NO_IRQ [not found] ` <1270167421-5205-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2010-04-02 0:16 ` [PATCH RESEND 1/3] i2c/mpc: drop NO_IRQ Wolfram Sang 2010-04-02 0:17 ` [PATCH RESEND 2/3] i2c/cpm: " Wolfram Sang @ 2010-04-02 0:17 ` Wolfram Sang [not found] ` <1270167421-5205-4-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2010-04-27 7:06 ` Benjamin Herrenschmidt 2 siblings, 2 replies; 9+ messages in thread From: Wolfram Sang @ 2010-04-02 0:17 UTC (permalink / raw) To: linux-i2c-u79uwXL29TY76Z2rM5mHXA Cc: linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, Ben Dooks, Wolfram Sang, Sean MacLennan Drop NO_IRQ as 0 is the preferred way to describe 'no irq' (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is only used on powerpc, where NO_IRQ is 0 anyhow. Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> Cc: Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/w@public.gmane.org> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org> --- drivers/i2c/busses/i2c-ibm_iic.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index b1bc6e2..2bef534 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -668,12 +668,12 @@ static int __devinit iic_request_irq(struct of_device *ofdev, int irq; if (iic_force_poll) - return NO_IRQ; + return 0; irq = irq_of_parse_and_map(np, 0); - if (irq == NO_IRQ) { + if (!irq) { dev_err(&ofdev->dev, "irq_of_parse_and_map failed\n"); - return NO_IRQ; + return 0; } /* Disable interrupts until we finish initialization, assumes @@ -683,7 +683,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev, if (request_irq(irq, iic_handler, 0, "IBM IIC", dev)) { dev_err(&ofdev->dev, "request_irq %d failed\n", irq); /* Fallback to the polling mode */ - return NO_IRQ; + return 0; } return irq; @@ -719,7 +719,7 @@ static int __devinit iic_probe(struct of_device *ofdev, init_waitqueue_head(&dev->wq); dev->irq = iic_request_irq(ofdev, dev); - if (dev->irq == NO_IRQ) + if (!dev->irq) dev_warn(&ofdev->dev, "using polling mode\n"); /* Board specific settings */ @@ -766,7 +766,7 @@ static int __devinit iic_probe(struct of_device *ofdev, return 0; error_cleanup: - if (dev->irq != NO_IRQ) { + if (dev->irq) { iic_interrupt_mode(dev, 0); free_irq(dev->irq, dev); } @@ -790,7 +790,7 @@ static int __devexit iic_remove(struct of_device *ofdev) i2c_del_adapter(&dev->adap); - if (dev->irq != NO_IRQ) { + if (dev->irq) { iic_interrupt_mode(dev, 0); free_irq(dev->irq, dev); } -- 1.7.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
[parent not found: <1270167421-5205-4-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: [PATCH RESEND 3/3] i2c/ibm-iic: drop NO_IRQ [not found] ` <1270167421-5205-4-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2010-04-02 19:47 ` Sean MacLennan 0 siblings, 0 replies; 9+ messages in thread From: Sean MacLennan @ 2010-04-02 19:47 UTC (permalink / raw) Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, Ben Dooks, Wolfram Sang On Fri, 2 Apr 2010 02:17:01 +0200 Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote: > Drop NO_IRQ as 0 is the preferred way to describe 'no irq' > (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the > driver is only used on powerpc, where NO_IRQ is 0 anyhow. > > Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> > Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> Acked-by: Sean MacLennan <smaclennan-Qtffpm9i2AVWk0Htik3J/w@public.gmane.org> Cheers, Sean ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND 3/3] i2c/ibm-iic: drop NO_IRQ 2010-04-02 0:17 ` [PATCH RESEND 3/3] i2c/ibm-iic: " Wolfram Sang [not found] ` <1270167421-5205-4-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2010-04-27 7:06 ` Benjamin Herrenschmidt 2010-04-27 7:12 ` Wolfram Sang 1 sibling, 1 reply; 9+ messages in thread From: Benjamin Herrenschmidt @ 2010-04-27 7:06 UTC (permalink / raw) To: Wolfram Sang; +Cc: linuxppc-dev, linux-i2c, Ben Dooks, Sean MacLennan On Fri, 2010-04-02 at 02:17 +0200, Wolfram Sang wrote: > Drop NO_IRQ as 0 is the preferred way to describe 'no irq' > (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is > only used on powerpc, where NO_IRQ is 0 anyhow. Oops... forgot those. Applied, will show up in -next soon. Cheers, Ben. > Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> > Acked-by: Grant Likely <grant.likely@secretlab.ca> > Cc: Sean MacLennan <smaclennan@pikatech.com> > Cc: Ben Dooks <ben-linux@fluff.org> > --- > drivers/i2c/busses/i2c-ibm_iic.c | 14 +++++++------- > 1 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c > index b1bc6e2..2bef534 100644 > --- a/drivers/i2c/busses/i2c-ibm_iic.c > +++ b/drivers/i2c/busses/i2c-ibm_iic.c > @@ -668,12 +668,12 @@ static int __devinit iic_request_irq(struct of_device *ofdev, > int irq; > > if (iic_force_poll) > - return NO_IRQ; > + return 0; > > irq = irq_of_parse_and_map(np, 0); > - if (irq == NO_IRQ) { > + if (!irq) { > dev_err(&ofdev->dev, "irq_of_parse_and_map failed\n"); > - return NO_IRQ; > + return 0; > } > > /* Disable interrupts until we finish initialization, assumes > @@ -683,7 +683,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev, > if (request_irq(irq, iic_handler, 0, "IBM IIC", dev)) { > dev_err(&ofdev->dev, "request_irq %d failed\n", irq); > /* Fallback to the polling mode */ > - return NO_IRQ; > + return 0; > } > > return irq; > @@ -719,7 +719,7 @@ static int __devinit iic_probe(struct of_device *ofdev, > init_waitqueue_head(&dev->wq); > > dev->irq = iic_request_irq(ofdev, dev); > - if (dev->irq == NO_IRQ) > + if (!dev->irq) > dev_warn(&ofdev->dev, "using polling mode\n"); > > /* Board specific settings */ > @@ -766,7 +766,7 @@ static int __devinit iic_probe(struct of_device *ofdev, > return 0; > > error_cleanup: > - if (dev->irq != NO_IRQ) { > + if (dev->irq) { > iic_interrupt_mode(dev, 0); > free_irq(dev->irq, dev); > } > @@ -790,7 +790,7 @@ static int __devexit iic_remove(struct of_device *ofdev) > > i2c_del_adapter(&dev->adap); > > - if (dev->irq != NO_IRQ) { > + if (dev->irq) { > iic_interrupt_mode(dev, 0); > free_irq(dev->irq, dev); > } ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND 3/3] i2c/ibm-iic: drop NO_IRQ 2010-04-27 7:06 ` Benjamin Herrenschmidt @ 2010-04-27 7:12 ` Wolfram Sang 2010-04-27 7:45 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2010-04-27 7:12 UTC (permalink / raw) To: Benjamin Herrenschmidt Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, Ben Dooks, Sean MacLennan [-- Attachment #1: Type: text/plain, Size: 642 bytes --] On Tue, Apr 27, 2010 at 05:06:14PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2010-04-02 at 02:17 +0200, Wolfram Sang wrote: > > Drop NO_IRQ as 0 is the preferred way to describe 'no irq' > > (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is > > only used on powerpc, where NO_IRQ is 0 anyhow. > > Oops... forgot those. Applied, will show up in -next soon. Ah, thanks. I also asked Ben Dooks to pick them up, but better twice than never ;) -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH RESEND 3/3] i2c/ibm-iic: drop NO_IRQ 2010-04-27 7:12 ` Wolfram Sang @ 2010-04-27 7:45 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 9+ messages in thread From: Benjamin Herrenschmidt @ 2010-04-27 7:45 UTC (permalink / raw) To: Wolfram Sang; +Cc: linuxppc-dev, linux-i2c, Ben Dooks, Sean MacLennan On Tue, 2010-04-27 at 09:12 +0200, Wolfram Sang wrote: > > Oops... forgot those. Applied, will show up in -next soon. > > Ah, thanks. I also asked Ben Dooks to pick them up, but better twice > than never > ;) Ok, Ben, are you taking them or do you want me to ? Cheers, Ben. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-04-27 7:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02 0:16 Delete NO_IRQ usage from I2C subsystem Wolfram Sang
[not found] ` <1270167421-5205-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-02 0:16 ` [PATCH RESEND 1/3] i2c/mpc: drop NO_IRQ Wolfram Sang
2010-04-02 0:17 ` [PATCH RESEND 2/3] i2c/cpm: " Wolfram Sang
[not found] ` <1270167421-5205-3-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-02 11:34 ` Jochen Friedrich
2010-04-02 0:17 ` [PATCH RESEND 3/3] i2c/ibm-iic: " Wolfram Sang
[not found] ` <1270167421-5205-4-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-02 19:47 ` Sean MacLennan
2010-04-27 7:06 ` Benjamin Herrenschmidt
2010-04-27 7:12 ` Wolfram Sang
2010-04-27 7:45 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).