All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl/lantiq: Free mapping configs for both pin and groups
@ 2013-05-14 15:00 Laurent Pinchart
  2013-05-15 10:36 ` John Crispin
  2013-05-15 11:29 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Pinchart @ 2013-05-14 15:00 UTC (permalink / raw)
  To: John Crispin; +Cc: Linus Walleij, linux-kernel

When creating mappings from DT both pin config and group config mappings
are allocated. Free them both when destroying the mappings.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/pinctrl/pinctrl-lantiq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c
index 615c500..d22ca25 100644
--- a/drivers/pinctrl/pinctrl-lantiq.c
+++ b/drivers/pinctrl/pinctrl-lantiq.c
@@ -52,7 +52,8 @@ static void ltq_pinctrl_dt_free_map(struct pinctrl_dev *pctldev,
 	int i;
 
 	for (i = 0; i < num_maps; i++)
-		if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN)
+		if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN ||
+		    map[i].type == PIN_MAP_TYPE_CONFIGS_GROUP)
 			kfree(map[i].data.configs.configs);
 	kfree(map);
 }
-- 
Regards,

Laurent Pinchart


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl/lantiq: Free mapping configs for both pin and groups
  2013-05-14 15:00 [PATCH] pinctrl/lantiq: Free mapping configs for both pin and groups Laurent Pinchart
@ 2013-05-15 10:36 ` John Crispin
  2013-05-15 11:29 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: John Crispin @ 2013-05-15 10:36 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Linus Walleij, linux-kernel

On 14/05/13 17:00, Laurent Pinchart wrote:
> When creating mappings from DT both pin config and group config mappings
> are allocated. Free them both when destroying the mappings.
>
> Signed-off-by: Laurent Pinchart<laurent.pinchart+renesas@ideasonboard.com>
Acked-by: John Crispin <blogic@openwrt.org>


> ---
>   drivers/pinctrl/pinctrl-lantiq.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c
> index 615c500..d22ca25 100644
> --- a/drivers/pinctrl/pinctrl-lantiq.c
> +++ b/drivers/pinctrl/pinctrl-lantiq.c
> @@ -52,7 +52,8 @@ static void ltq_pinctrl_dt_free_map(struct pinctrl_dev *pctldev,
>   	int i;
>
>   	for (i = 0; i<  num_maps; i++)
> -		if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN)
> +		if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN ||
> +		    map[i].type == PIN_MAP_TYPE_CONFIGS_GROUP)
>   			kfree(map[i].data.configs.configs);
>   	kfree(map);
>   }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl/lantiq: Free mapping configs for both pin and groups
  2013-05-14 15:00 [PATCH] pinctrl/lantiq: Free mapping configs for both pin and groups Laurent Pinchart
  2013-05-15 10:36 ` John Crispin
@ 2013-05-15 11:29 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-05-15 11:29 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: John Crispin, linux-kernel@vger.kernel.org

On Tue, May 14, 2013 at 5:00 PM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:

> When creating mappings from DT both pin config and group config mappings
> are allocated. Free them both when destroying the mappings.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Applied to fixes with John's ACK, thanks!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-15 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 15:00 [PATCH] pinctrl/lantiq: Free mapping configs for both pin and groups Laurent Pinchart
2013-05-15 10:36 ` John Crispin
2013-05-15 11:29 ` Linus Walleij

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.