Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1210864

Re: [PATCH v3] pinctrl: mediatek: Fix multiple registration issue.

From Axel Lin <axel.lin@ingics.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] pinctrl: mediatek: Fix multiple registration issue.
Date 2015-08-21 07:10 +0200
Message-ID <pZMKu-2ca-3@gated-at.bofh.it> (permalink)
References <pZMr7-1zQ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2015-08-21 12:46 GMT+08:00 Hongzhou Yang <hongzhou.yang@mediatek.com>:
> Since our common driver need support main chip and PMU
> at the same time, that means it will register two
> pinctrl device, and the pinctrl_desc structure should
> be used two times.
>
> But pinctrl_desc use global static definition, then
> the latest registered pinctrl device will overwrite
> the old one's, all members in pinctrl_desc will set to
> the new one's, such as name, pins and pins numbers, etc.
> This is a bug. Changing to use devm_kzalloc to fix it.
>
> Cc: stable@vger.kernel.org # v4.1+
> Signed-off-by: Hongzhou Yang <hongzhou.yang@mediatek.com>
> ---
>  Use dynamic allocation to fix multiple registration issue.

The code looks good to me but the commit log needs fix.
You don't use devm_kzalloc now.
Just embedded struct pinctrl_desc pctl_desc to struct mtk_pinctrl.

Reviewed-by: Axel Lin <axel.lin@ingics.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3] pinctrl: mediatek: Fix multiple registration issue. Hongzhou Yang <hongzhou.yang@mediatek.com> - 2015-08-21 06:50 +0200
  Re: [PATCH v3] pinctrl: mediatek: Fix multiple registration issue. Axel Lin <axel.lin@ingics.com> - 2015-08-21 07:10 +0200

csiph-web