From: Linus Walleij Date: Mon, 27 May 2013 13:53:32 +0000 (+0200) Subject: pinctrl: pinconf: take the right mutex X-Git-Tag: MMI-PSA29.97-13-9~14317^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a386267a2ceea33d76fa2b7f1c2e72a858fcb68e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git pinctrl: pinconf: take the right mutex 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 Cc: Patrice Chotard Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index c67c37e23dd7..694c3ace4520 100644 --- a/drivers/pinctrl/pinconf.c +++ b/drivers/pinctrl/pinconf.c @@ -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) { @@ -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; }