From patchwork Mon May 27 13:55:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 17222 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f200.google.com (mail-gg0-f200.google.com [209.85.161.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A704C238E8 for ; Mon, 27 May 2013 13:57:04 +0000 (UTC) Received: by mail-gg0-f200.google.com with SMTP id w6sf7572310ggk.11 for ; Mon, 27 May 2013 06:56:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to:from:to:cc :subject:date:message-id:x-mailer:mime-version:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=6c+LI/6Md+eP1Up9vkOWdoPLk29KTIbZpbXuBeYRGAQ=; b=h3dpJ7Bu1+Dq1tN6DSDM0W63yq3jZ3O+rb/xj+yYZVjYAtcqY7aoIOveISGcTUUXcp 9ZngNomW2iLHMEHgjQ58f2is96vxplNGbS4+/uArWmWuT2iYq0f6xFeEsVv9AeEsHpAa n/w/1FG7XDyUevRmCeXFubRehmCfn3yElMluWeJnFW1M1lZ12Z8nmPZvHBhcVe6DM8co fwS4M9NC/b8Xi58qEoMSL7i3SFVavryUlksN2xOk4psuDQsCGeg6zm4KW0hjg6yE15wk 1rnrhU+ntHaRaUlSqsJZT4daLEqLN3dnpmMNEZ+vYiuhmdb/gzT95NG0yF68+eYlNizM rEQg== X-Received: by 10.224.59.205 with SMTP id m13mr15363872qah.7.1369662960077; Mon, 27 May 2013 06:56:00 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.118.104 with SMTP id kl8ls2906293qeb.78.gmail; Mon, 27 May 2013 06:55:59 -0700 (PDT) X-Received: by 10.220.96.17 with SMTP id f17mr15206186vcn.58.1369662959926; Mon, 27 May 2013 06:55:59 -0700 (PDT) Received: from mail-vb0-x230.google.com (mail-vb0-x230.google.com [2607:f8b0:400c:c02::230]) by mx.google.com with ESMTPS id x16si16802351vci.38.2013.05.27.06.55.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 May 2013 06:55:59 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::230 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::230; Received: by mail-vb0-f48.google.com with SMTP id w8so3708426vbf.21 for ; Mon, 27 May 2013 06:55:59 -0700 (PDT) X-Received: by 10.52.233.34 with SMTP id tt2mr12882746vdc.70.1369662959802; Mon, 27 May 2013 06:55:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.229.199 with SMTP id jj7csp956vcb; Mon, 27 May 2013 06:55:58 -0700 (PDT) X-Received: by 10.14.89.66 with SMTP id b42mr10244059eef.89.1369662958166; Mon, 27 May 2013 06:55:58 -0700 (PDT) Received: from eu1sys200aog101.obsmtp.com (eu1sys200aog101.obsmtp.com [207.126.144.111]) by mx.google.com with SMTP id j45si10420043eey.351.2013.05.27.06.55.29 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 27 May 2013 06:55:58 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.111 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.111; Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP ID DSNKUaNl0cF/PpRPseWqkL+1z4csalLHR7yN@postini.com; Mon, 27 May 2013 13:55:57 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 6AE383B; Mon, 27 May 2013 13:54:29 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 7E70A4E; Mon, 27 May 2013 13:55:27 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 77FE0A8065; Mon, 27 May 2013 15:55:21 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.279.5; Mon, 27 May 2013 15:55:27 +0200 From: Linus Walleij To: , Cc: Stephen Warren , Anmar Oueja , Linus Walleij , Patrice Chotard Subject: [PATCH] pinctrl: pinconf: take the right mutex Date: Mon, 27 May 2013 15:55:20 +0200 Message-ID: <1369662920-31339-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkQLcF4KyPzd5FPdHzgSXxgT/Y9XRRjfzUeYXNHES4bFqgWzQ5XnnsllkiUVHIivgyhAiYh X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::230 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Linus Walleij 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 --- drivers/pinctrl/pinconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index c67c37e..694c3ac 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; }