]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: mediatek: Fix multiple registration issue.
authorHongzhou Yang <hongzhou.yang@mediatek.com>
Wed, 26 Aug 2015 00:32:45 +0000 (17:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:33:22 +0000 (19:33 +0200)
commit3771834bb9422446dffe0169b78a843b0da5fd01
tree7038b7e0c89cecf2a910fbe5030bc8ddd97540c1
parentb626fbd484fa13f407a015f9b56ec6276b2293b7
pinctrl: mediatek: Fix multiple registration issue.

commit d48c2c02645392483f2b88b050d21ce1db6997b3 upstream.

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.

Move pinctrl_desc into mtk_pinctrl, assign new value for
each pinctrl device to fix it.

Signed-off-by: Hongzhou Yang <hongzhou.yang@mediatek.com>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
drivers/pinctrl/mediatek/pinctrl-mtk-common.h