summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
diff options
context:
space:
mode:
authorHongzhou Yang <hongzhou.yang@mediatek.com>2015-08-25 17:32:45 -0700
committerLinus Walleij <linus.walleij@linaro.org>2015-08-26 14:37:44 +0200
commitd48c2c02645392483f2b88b050d21ce1db6997b3 (patch)
tree2d8066941940c7ebbe422ecb434df8d04af5f6d5 /drivers/pinctrl/mediatek/pinctrl-mtk-common.h
parent580a7ee93317b901358f497c2de34f7a66066963 (diff)
downloadlwn-d48c2c02645392483f2b88b050d21ce1db6997b3.tar.gz
lwn-d48c2c02645392483f2b88b050d21ce1db6997b3.zip
pinctrl: mediatek: Fix multiple registration issue.
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. Cc: stable@vger.kernel.org # v4.1+ 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>
Diffstat (limited to 'drivers/pinctrl/mediatek/pinctrl-mtk-common.h')
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mtk-common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
index 30213e514c2f..c532c23c70b4 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
@@ -256,6 +256,7 @@ struct mtk_pinctrl_devdata {
struct mtk_pinctrl {
struct regmap *regmap1;
struct regmap *regmap2;
+ struct pinctrl_desc pctl_desc;
struct device *dev;
struct gpio_chip *chip;
struct mtk_pinctrl_group *groups;