Commit d99c8053 authored by Laurent Meunier's avatar Laurent Meunier Committed by Linus Walleij

pinctrl: pinconf: remove needless loop

This removes a needless loop which was caught in pinconf.c.
Suggested-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarLaurent Meunier <laurent.meunier@st.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 241297c2
...@@ -411,7 +411,7 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d) ...@@ -411,7 +411,7 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d)
const struct pinctrl_map *found = NULL; const struct pinctrl_map *found = NULL;
struct pinctrl_dev *pctldev; struct pinctrl_dev *pctldev;
struct dbg_cfg *dbg = &pinconf_dbg_conf; struct dbg_cfg *dbg = &pinconf_dbg_conf;
int i, j; int i;
mutex_lock(&pinctrl_maps_mutex); mutex_lock(&pinctrl_maps_mutex);
...@@ -424,13 +424,10 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d) ...@@ -424,13 +424,10 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d)
if (strcmp(map->name, dbg->state_name)) if (strcmp(map->name, dbg->state_name))
continue; continue;
for (j = 0; j < map->data.configs.num_configs; j++) { if (!strcmp(map->data.configs.group_or_pin, dbg->pin_name)) {
if (!strcmp(map->data.configs.group_or_pin, /* We found the right pin */
dbg->pin_name)) { found = map;
/* We found the right pin / state */ break;
found = map;
break;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment