summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Meunier <laurent.meunier@st.com>2015-10-30 17:15:51 +0300
committerLinus Walleij <linus.walleij@linaro.org>2015-11-01 00:13:07 +0300
commitd99c8053fc2473115f506782822cb7c33c687513 (patch)
tree7172f9a9fe091fa9d9585f648c65c7cdf0fa8bbd
parent241297c2af8bf0459a590c143a1d15b93779fab1 (diff)
downloadlinux-d99c8053fc2473115f506782822cb7c33c687513.tar.xz
pinctrl: pinconf: remove needless loop
This removes a needless loop which was caught in pinconf.c. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Laurent Meunier <laurent.meunier@st.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinconf.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index 29a7bb17a42f..4dd7722f9935 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -411,7 +411,7 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d)
const struct pinctrl_map *found = NULL;
struct pinctrl_dev *pctldev;
struct dbg_cfg *dbg = &pinconf_dbg_conf;
- int i, j;
+ int i;
mutex_lock(&pinctrl_maps_mutex);
@@ -424,13 +424,10 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d)
if (strcmp(map->name, dbg->state_name))
continue;
- for (j = 0; j < map->data.configs.num_configs; j++) {
- if (!strcmp(map->data.configs.group_or_pin,
- dbg->pin_name)) {
- /* We found the right pin / state */
- found = map;
- break;
- }
+ if (!strcmp(map->data.configs.group_or_pin, dbg->pin_name)) {
+ /* We found the right pin */
+ found = map;
+ break;
}
}