pinctrl: pinconf: take the right mutex
authorLinus Walleij <[email protected]>
Mon, 27 May 2013 13:53:32 +0000 (15:53 +0200)
committerLinus Walleij <[email protected]>
Mon, 27 May 2013 13:53:32 +0000 (15:53 +0200)
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 <[email protected]>
Cc: Patrice Chotard <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
drivers/pinctrl/pinconf.c

index c67c37e23dd77846d2fd3bbd18bf102349064b57..694c3ace45204c11eeed4518f82b901c92489b59 100644 (file)
@@ -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;
 }