diff options
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-imx.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c index dd6d93aa5334..2bafb5d9c712 100644 --- a/drivers/pinctrl/pinctrl-imx.c +++ b/drivers/pinctrl/pinctrl-imx.c | |||
@@ -146,7 +146,7 @@ static int imx_dt_node_to_map(struct pinctrl_dev *pctldev, | |||
146 | struct pinctrl_map *new_map; | 146 | struct pinctrl_map *new_map; |
147 | struct device_node *parent; | 147 | struct device_node *parent; |
148 | int map_num = 1; | 148 | int map_num = 1; |
149 | int i; | 149 | int i, j; |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * first find the group of this node and check if we need create | 152 | * first find the group of this node and check if we need create |
@@ -184,13 +184,14 @@ static int imx_dt_node_to_map(struct pinctrl_dev *pctldev, | |||
184 | 184 | ||
185 | /* create config map */ | 185 | /* create config map */ |
186 | new_map++; | 186 | new_map++; |
187 | for (i = 0; i < grp->npins; i++) { | 187 | for (i = j = 0; i < grp->npins; i++) { |
188 | if (!(grp->configs[i] & IMX_NO_PAD_CTL)) { | 188 | if (!(grp->configs[i] & IMX_NO_PAD_CTL)) { |
189 | new_map[i].type = PIN_MAP_TYPE_CONFIGS_PIN; | 189 | new_map[j].type = PIN_MAP_TYPE_CONFIGS_PIN; |
190 | new_map[i].data.configs.group_or_pin = | 190 | new_map[j].data.configs.group_or_pin = |
191 | pin_get_name(pctldev, grp->pins[i]); | 191 | pin_get_name(pctldev, grp->pins[i]); |
192 | new_map[i].data.configs.configs = &grp->configs[i]; | 192 | new_map[j].data.configs.configs = &grp->configs[i]; |
193 | new_map[i].data.configs.num_configs = 1; | 193 | new_map[j].data.configs.num_configs = 1; |
194 | j++; | ||
194 | } | 195 | } |
195 | } | 196 | } |
196 | 197 | ||