Skip to content

Commit

Permalink
pinctrl: remove mutex lock in groups show
Browse files Browse the repository at this point in the history
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: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Haojian Zhuang authored and Linus Walleij committed Oct 18, 2012
1 parent a03690e commit 7ae9d71
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/pinctrl/pinconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, "Format: group (name): configs\n");

mutex_lock(&pinctrl_mutex);

while (selector < ngroups) {
const char *gname = pctlops->get_group_name(pctldev, selector);

Expand All @@ -549,8 +547,6 @@ static int pinconf_groups_show(struct seq_file *s, void *what)
selector++;
}

mutex_unlock(&pinctrl_mutex);

return 0;
}

Expand Down

0 comments on commit 7ae9d71

Please sign in to comment.