Skip to content

Commit

Permalink
pinctrl: pinconf: take the right mutex
Browse files Browse the repository at this point in the history
The pinconf_dgb_config_print() takes the per-pincontroller
mutex, when what it wants to take is actually the pin maps
mutex.

Reported-by: James Hogan <james.hogan@imgtec.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed May 27, 2013
1 parent d72f88a commit a386267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pinctrl/pinconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d)
bool found = false;
unsigned long config;

mutex_lock(&pctldev->mutex);
mutex_lock(&pinctrl_maps_mutex);

/* Parse the pinctrl map and look for the elected pin/state */
for_each_maps(maps_node, i, map) {
Expand Down Expand Up @@ -659,7 +659,7 @@ static int pinconf_dbg_config_print(struct seq_file *s, void *d)
confops->pin_config_config_dbg_show(pctldev, s, config);

exit:
mutex_unlock(&pctldev->mutex);
mutex_unlock(&pinctrl_maps_mutex);

return 0;
}
Expand Down

0 comments on commit a386267

Please sign in to comment.