All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: linuxppc-dev@ozlabs.org, linux-i2c@vger.kernel.org,
	Ben Dooks <ben-linux@fluff.org>,
	Sean MacLennan <smaclennan@pikatech.com>
Subject: Re: [PATCH RESEND 3/3] i2c/ibm-iic: drop NO_IRQ
Date: Tue, 27 Apr 2010 17:06:14 +1000	[thread overview]
Message-ID: <1272351974.24542.9.camel@pasglop> (raw)
In-Reply-To: <1270167421-5205-4-git-send-email-w.sang@pengutronix.de>

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);
>  	}

  parent reply	other threads:[~2010-04-27  7:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02  0:16 Delete NO_IRQ usage from I2C subsystem Wolfram Sang
2010-04-02  0:16 ` 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:16     ` 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-3-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-02 11:34       ` Jochen Friedrich
2010-04-02 11:34         ` Jochen Friedrich
2010-04-02  0:17   ` [PATCH RESEND 3/3] i2c/ibm-iic: " 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-02 19:47       ` Sean MacLennan
2010-04-02 19:47         ` Sean MacLennan
2010-04-27  7:06     ` Benjamin Herrenschmidt [this message]
2010-04-27  7:12       ` Wolfram Sang
2010-04-27  7:12         ` Wolfram Sang
2010-04-27  7:45         ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272351974.24542.9.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=ben-linux@fluff.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=smaclennan@pikatech.com \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.