Commit 7ae9d71e authored by Haojian Zhuang's avatar Haojian Zhuang Committed by Linus Walleij

pinctrl: remove mutex lock in groups show

Mutex is locked duplicatly by pinconf_groups_show() and
pin_config_group_get(). It results dead lock. So avoid to lock mutex
in pinconf_groups_show().

Cc: stable@kernel.org
Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a03690e4
...@@ -537,8 +537,6 @@ static int pinconf_groups_show(struct seq_file *s, void *what) ...@@ -537,8 +537,6 @@ static int pinconf_groups_show(struct seq_file *s, void *what)
seq_puts(s, "Pin config settings per pin group\n"); seq_puts(s, "Pin config settings per pin group\n");
seq_puts(s, "Format: group (name): configs\n"); seq_puts(s, "Format: group (name): configs\n");
mutex_lock(&pinctrl_mutex);
while (selector < ngroups) { while (selector < ngroups) {
const char *gname = pctlops->get_group_name(pctldev, selector); const char *gname = pctlops->get_group_name(pctldev, selector);
...@@ -549,8 +547,6 @@ static int pinconf_groups_show(struct seq_file *s, void *what) ...@@ -549,8 +547,6 @@ static int pinconf_groups_show(struct seq_file *s, void *what)
selector++; selector++;
} }
mutex_unlock(&pinctrl_mutex);
return 0; return 0;
} }
......
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