[PATCH 3/3] pinctrl: rockchip: use alias rather than full of name

Michael Riesch michael.riesch at wolfvision.net
Thu Nov 11 06:03:16 PST 2021


Do not rely on GPIO controllers being named "gpioX". Instead, use the
alias to match the controllers to the GPIO banks.

Signed-off-by: Michael Riesch <michael.riesch at wolfvision.net>
---
 drivers/pinctrl/pinctrl-rockchip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 1fdb9a913..0e706c51d 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -888,7 +888,7 @@ static struct rockchip_pin_ctrl *rockchip_pinctrl_get_soc_data(
 		bank = ctrl->pin_banks;
 		for (i = 0; i < ctrl->nr_banks; ++i, ++bank) {
 			name = bank->name;
-			if (!strncmp(name, np->name, strlen(name))) {
+			if (!strncmp(name, of_alias_get(np), strlen(name))) {
 				bank->of_node = np;
 				if (!rockchip_get_bank_data(bank, dev))
 					bank->valid = true;
-- 
2.30.2




More information about the barebox mailing list