From patchwork Mon Jan 14 13:44:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10762647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59DA614E5 for ; Mon, 14 Jan 2019 13:53:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 437E12880C for ; Mon, 14 Jan 2019 13:53:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3757428BE6; Mon, 14 Jan 2019 13:53:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 227372880C for ; Mon, 14 Jan 2019 13:53:35 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3A3DC2670A8; Mon, 14 Jan 2019 14:46:08 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0E91E266B69; Mon, 14 Jan 2019 14:46:01 +0100 (CET) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by alsa0.perex.cz (Postfix) with ESMTP id 27A22266B57 for ; Mon, 14 Jan 2019 14:45:56 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id f188so8879101wmf.5 for ; Mon, 14 Jan 2019 05:45:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wcq/BZjA1FXBmfYxzVF9/4lLVBugXEKEif9lDq84KTU=; b=WYgKve76AQapL96P//w9NBFMjzVpCPuV8TxBk81O+FXe5c9IK/zBEFrQmR4S2O09UR 6OqbSicCV3seQTILK21YiaU4XHBsbTV82pUDQjCB5AObNHnfxuBde8YbBvoZBhRgVhnw xberplgt88Z4je80I8tlQZ7v7o2XE7iOFxMTY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wcq/BZjA1FXBmfYxzVF9/4lLVBugXEKEif9lDq84KTU=; b=ow6v/fdXhT6i9FfkOnjqoCVJ1lla5alM4raIAMr/1gUHDm+3HRlUsdLatHWf12RPta mW3jVPOvbsUMNLKLqdAX9PiRLV2WQjOEWCDV1gGT127yQZQ71h7qx90Yc/0cDoVZGSy7 ISP7WG7cKHQj0PWtF4+hZDCuJ5xq0ip8hwz8DhLoL3iSqpwwQsXgDgRXzfIEWSBkzjgV WGJfgHTsieMHBD8hxbaNopdLM8HBOaPwRr4ZKlSsaOHf15dMQQC1ElxZek83WLc33Qa/ ccPGapi8MtPU5/4Mf+JGTuIeqJk6gkBZSPD3ZkUiT7fqpUMGNI6KHBYN1i7863myn5fT FFXg== X-Gm-Message-State: AJcUukcnVK397heJbtCMyALdPA5y0nTAxvHTmpuNpn/o8jJ9a63cgOkE BUki+EYA19glYL58YPVdFQIZ+eolwJE= X-Google-Smtp-Source: ALg8bN64kMU4Zn8sj96BtI9KdISTw1k7FD7k6jTQSUEXSzZQv0Ihl1I4aNOOo+S0/qTxrawQKPLjhA== X-Received: by 2002:a1c:bdc5:: with SMTP id n188mr12588988wmf.69.1547473556520; Mon, 14 Jan 2019 05:45:56 -0800 (PST) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id x10sm86766472wrn.29.2019.01.14.05.45.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Jan 2019 05:45:55 -0800 (PST) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Date: Mon, 14 Jan 2019 13:44:47 +0000 Message-Id: <20190114134449.15367-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190114134449.15367-1-srinivas.kandagatla@linaro.org> References: <20190114134449.15367-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Cc: linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, broonie@kernel.org, Srinivas Kandagatla , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH 2/4] slimbus: core: do not call device_status under a lock X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Calling device_status callback under a lock would prevent drivers to do any slimbus trasactions which would invoke this lock like get_laddr(). Remove this unnecessary lock! Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 9e4f3b21ba8c..1ba08b5f2e78 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -466,6 +466,7 @@ static int slim_device_alloc_laddr(struct slim_device *sbdev, sbdev->laddr = laddr; sbdev->is_laddr_valid = true; + mutex_unlock(&ctrl->lock); slim_device_update_status(sbdev, SLIM_DEVICE_STATUS_UP); @@ -473,6 +474,8 @@ static int slim_device_alloc_laddr(struct slim_device *sbdev, laddr, sbdev->e_addr.manf_id, sbdev->e_addr.prod_code, sbdev->e_addr.dev_index, sbdev->e_addr.instance); + return 0; + err: mutex_unlock(&ctrl->lock); return ret;