All of lore.kernel.org
 help / color / mirror / Atom feed
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] gpiolib: separation of pin concerns
Date: Tue, 06 Nov 2012 14:37:16 -0700	[thread overview]
Message-ID: <5099830C.4010703@wwwdotorg.org> (raw)
In-Reply-To: <1352215028-30381-1-git-send-email-linus.walleij@stericsson.com>

On 11/06/2012 08:17 AM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
> 
> The fact that of_gpiochip_add_pin_range() and
> gpiochip_add_pin_range() share too much code is fragile and
> will invariably mean that bugs need to be fixed in two places
> instead of one.
> 
> So separate the concerns of gpiolib.c and gpiolib-of.c and
> have the latter call the former as back-end. This is necessary
> also when going forward with other device descriptions such
> as ACPI.

> diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c

> @@ -115,7 +114,6 @@ struct pinctrl_dev *of_pinctrl_add_gpio_range(struct device_node *np,
>  	if (!pctldev)
>  		return NULL;
>  
> -	pinctrl_add_gpio_range(pctldev, range);
>  	return pctldev;
>  }

I think that collapses to just:

	return pctldev;

Aside from that, the series,

Reviewed-by: Stephen Warren <swarren@nvidia.com>

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Linus Walleij <linus.walleij@stericsson.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Shiraz Hashim <shiraz.hashim@st.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Stephen Warren <swarren@nvidia.com>,
	Anmar Oueja <anmar.oueja@linaro.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 5/5] gpiolib: separation of pin concerns
Date: Tue, 06 Nov 2012 14:37:16 -0700	[thread overview]
Message-ID: <5099830C.4010703@wwwdotorg.org> (raw)
In-Reply-To: <1352215028-30381-1-git-send-email-linus.walleij@stericsson.com>

On 11/06/2012 08:17 AM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
> 
> The fact that of_gpiochip_add_pin_range() and
> gpiochip_add_pin_range() share too much code is fragile and
> will invariably mean that bugs need to be fixed in two places
> instead of one.
> 
> So separate the concerns of gpiolib.c and gpiolib-of.c and
> have the latter call the former as back-end. This is necessary
> also when going forward with other device descriptions such
> as ACPI.

> diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c

> @@ -115,7 +114,6 @@ struct pinctrl_dev *of_pinctrl_add_gpio_range(struct device_node *np,
>  	if (!pctldev)
>  		return NULL;
>  
> -	pinctrl_add_gpio_range(pctldev, range);
>  	return pctldev;
>  }

I think that collapses to just:

	return pctldev;

Aside from that, the series,

Reviewed-by: Stephen Warren <swarren@nvidia.com>

  reply	other threads:[~2012-11-06 21:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-06 15:17 [PATCH 5/5] gpiolib: separation of pin concerns Linus Walleij
2012-11-06 15:17 ` Linus Walleij
2012-11-06 21:37 ` Stephen Warren [this message]
2012-11-06 21:37   ` Stephen Warren

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=5099830C.4010703@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=linux-arm-kernel@lists.infradead.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.