All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Bongkyu Kim <bongkyu.kim@lge.com>
Cc: grant.likely@secretlab.ca, devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] of/i2c: support more interrupt specifiers
Date: Wed, 21 Nov 2012 07:41:06 -0600	[thread overview]
Message-ID: <50ACD9F2.40207@gmail.com> (raw)
In-Reply-To: <1353488322-14764-1-git-send-email-bongkyu.kim@lge.com>

On 11/21/2012 02:58 AM, Bongkyu Kim wrote:
> This patch supports more interrupt specifiers for i2c client.

Why?

> Signed-off-by: Bongkyu Kim <bongkyu.kim@lge.com>
> ---
>  drivers/of/of_i2c.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
> index 3550f3b..c6d9b7e 100644
> --- a/drivers/of/of_i2c.c
> +++ b/drivers/of/of_i2c.c
> @@ -34,6 +34,7 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
>  		struct dev_archdata dev_ad = {};
>  		const __be32 *addr;
>  		int len;
> +		int nr = 0;
>  
>  		dev_dbg(&adap->dev, "of_i2c: register %s\n", node->full_name);
>  
> @@ -57,7 +58,9 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
>  			continue;
>  		}
>  
> -		info.irq = irq_of_parse_and_map(node, 0);
> +		info.irq = irq_of_parse_and_map(node, nr++);
> +		while (irq_of_parse_and_map(node, nr))
> +			nr++;

What's the point if you are just discarding the interrupt number? If
this is needed, then shouldn't you fix i2c_board_info first?

Rob

>  		info.of_node = of_node_get(node);
>  		info.archdata = &dev_ad;
>  
> 

  reply	other threads:[~2012-11-21 13:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21  8:58 [PATCH] of/i2c: support more interrupt specifiers Bongkyu Kim
2012-11-21 13:41 ` Rob Herring [this message]
     [not found]   ` <50ACD9F2.40207-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-22  5:50     ` 김봉규
2012-11-26  5:11   ` Bongkyu Kim
2012-11-26 14:08     ` Grant Likely

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=50ACD9F2.40207@gmail.com \
    --to=robherring2@gmail.com \
    --cc=bongkyu.kim@lge.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    /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.