]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
pinctrl: pinconf: remove needless loop
authorLaurent Meunier <laurent.meunier@st.com>
Fri, 30 Oct 2015 14:15:51 +0000 (15:15 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 31 Oct 2015 21:13:07 +0000 (22:13 +0100)
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>
drivers/pinctrl/pinconf.c

index 29a7bb17a42f52b85cf82bbb6dc01c2311ffa0b1..4dd7722f993552a4c8cd698cdc2f8d224dc337c4 100644 (file)
@@ -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;
                }
        }