diff mbox series

[1/4] pinctrl: mediatek: fix wrong assignment in mtk_get_pin_name

Message ID ea8c96c7a7200681fab161ab79be613d4ffd40d8.1614909515.git.weijie.gao@mediatek.com
State Accepted
Commit 4fc5d4cedbbb567322849736bdee2687407add3f
Delegated to: Tom Rini
Headers show
Series Minor fixes for MediaTek pinctrl driver | expand

Commit Message

Weijie Gao March 5, 2021, 2:22 a.m. UTC
From: Sam Shih <sam.shih@mediatek.com>

This is a bug fix for mtk pinctrl common part. Appearently pins should be
used instead of grps in mtk_get_pin_name().

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini March 20, 2021, 11:36 p.m. UTC | #1
On Fri, Mar 05, 2021 at 10:22:11AM +0800, Weijie Gao wrote:

> From: Sam Shih <sam.shih@mediatek.com>
> 
> This is a bug fix for mtk pinctrl common part. Appearently pins should be
> used instead of grps in mtk_get_pin_name().
> 
> Signed-off-by: Sam Shih <sam.shih@mediatek.com>

Applied to u-boot/next, thanks!
diff mbox series

Patch

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 4dd3f73ead..b700dd98bf 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -219,7 +219,7 @@  static const char *mtk_get_pin_name(struct udevice *dev,
 {
 	struct mtk_pinctrl_priv *priv = dev_get_priv(dev);
 
-	if (!priv->soc->grps[selector].name)
+	if (!priv->soc->pins[selector].name)
 		return mtk_pinctrl_dummy_name;
 
 	return priv->soc->pins[selector].name;