From patchwork Wed Dec 4 09:21:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 11272529 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9C1A138C for ; Wed, 4 Dec 2019 09:22:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 950A320675 for ; Wed, 4 Dec 2019 09:22:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PwlNbmcj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727351AbfLDJWl (ORCPT ); Wed, 4 Dec 2019 04:22:41 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:35031 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725922AbfLDJWl (ORCPT ); Wed, 4 Dec 2019 04:22:41 -0500 Received: by mail-pg1-f195.google.com with SMTP id l24so3090629pgk.2; Wed, 04 Dec 2019 01:22:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=RcbR6HMJahH8S+8hPGsQFh+2INPfSPu+4YZ/KRZS6sc=; b=PwlNbmcj4jRwxxtbvay8AMytuXlVyeudiTZ53oMfDtNYcWxsPz7CfiWLt8/bZw/ZLF tn8kb7NrVwyZAJsL5jlEo9x40Nlfb7GNVsNK/Iptj6+Hm3BSeR94AsgKqPhE9LS5KAis hcPOSZQ4MQ//VYvKRoarhYGvkZR9VFbklNcdDZk38sI//HjxnvU8WguqadxpIZpsspHA vsKU5S+znaWQk/UR/SfkLhdFBnGiFEIPzPUez9Nu6MYdtKpjLxY4YioEmEU2/Ob8VGeB BdGCwVsHJ0KK73zTjpzb/hV8P6Vt7VSBabAVjOYwEBvUi6ZOOsGKL4u1hkLY8etNKlmM Q5FA== 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:in-reply-to:references; bh=RcbR6HMJahH8S+8hPGsQFh+2INPfSPu+4YZ/KRZS6sc=; b=PLChGhSP4x0QGDgGUvy7vxfkLnYdeFjhdsA4BZg/dJR9It6LoazLNusg94sRlEx6Hg gCPH05DigCtofpDYUabw9lmeGDpB+mywupuaEKXZXRSWRJLdAEl8DCJCzqt2zzTkfR40 deImQcXSFbrp73rucBPqVRuwiFxSQyEqxFaAc0dk2mKqg/BuCm1vknjpn28vwKnDuJFU hg4WORahYRtS1bs2JHmHuFZRTcifeKm9pBKVbo+9aTBd4F+VPIC3UTj/ceCP3thhv8Mp xfIdq2Ep0owf7iya0FxMHZYctD8SQ0z/Wx+FxJt9DG8Bqpu/AP7PNSCBBAe/rGeSuj8r aPlQ== X-Gm-Message-State: APjAAAXNHO61wfqUpjUyMIHoSUgfhb7AIs7N16ru0vC9YyMd25CrYGUu xv3E/fssaHQ3qO8eo01VWDGNM2cG X-Google-Smtp-Source: APXvYqyf7BFjJeVIhudzGmIllqrc631Mp0eGF/xU1YsvnCTBdydP3AMHy/pk9b7X/Iat7YpnE1b3kQ== X-Received: by 2002:aa7:8ad3:: with SMTP id b19mr2525433pfd.134.1575451360171; Wed, 04 Dec 2019 01:22:40 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id k21sm6482914pgt.22.2019.12.04.01.22.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Dec 2019 01:22:39 -0800 (PST) From: Baolin Wang To: agross@kernel.org, ohad@wizery.com, bjorn.andersson@linaro.org Cc: baolin.wang7@gmail.com, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] hwspinlock: qcom: Remove redundant PM runtime functions Date: Wed, 4 Dec 2019 17:21:56 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since the hwspinlock core has changed the PM runtime to be optional, and the Qualcomm hardware spinlock has no pm runtime requirement, thus remove these redundant PM runtime functions. Signed-off-by: Baolin Wang --- drivers/hwspinlock/qcom_hwspinlock.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/hwspinlock/qcom_hwspinlock.c b/drivers/hwspinlock/qcom_hwspinlock.c index 6da7447..5a736b0 100644 --- a/drivers/hwspinlock/qcom_hwspinlock.c +++ b/drivers/hwspinlock/qcom_hwspinlock.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include "hwspinlock_internal.h" @@ -122,14 +121,8 @@ static int qcom_hwspinlock_probe(struct platform_device *pdev) regmap, field); } - pm_runtime_enable(&pdev->dev); - - ret = hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops, - 0, QCOM_MUTEX_NUM_LOCKS); - if (ret) - pm_runtime_disable(&pdev->dev); - - return ret; + return hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops, + 0, QCOM_MUTEX_NUM_LOCKS); } static int qcom_hwspinlock_remove(struct platform_device *pdev) @@ -143,8 +136,6 @@ static int qcom_hwspinlock_remove(struct platform_device *pdev) return ret; } - pm_runtime_disable(&pdev->dev); - return 0; } From patchwork Wed Dec 4 09:21:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 11272535 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEC94138C for ; Wed, 4 Dec 2019 09:22:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB1C420803 for ; Wed, 4 Dec 2019 09:22:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SJQU3xhD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725994AbfLDJWo (ORCPT ); Wed, 4 Dec 2019 04:22:44 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41706 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725922AbfLDJWn (ORCPT ); Wed, 4 Dec 2019 04:22:43 -0500 Received: by mail-pl1-f196.google.com with SMTP id bd4so2917975plb.8; Wed, 04 Dec 2019 01:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=hZU5YxHkU3BPXm/EGoWnc2P2DRdz8maIfOi1+S2ITKQ=; b=SJQU3xhDgVQLlqA2PNtmG0PvjtPCUUFyIjwfkUQwJg5y6Fl0apVSgQohqruxl80yaA NacX44nKHdGBRWHkNNaneKAV4PnO+SJTAafIId/KbpgyqXo80LHYLyXBIw63Yr7x+gHK HD1IQot5k1EHAs8UY1vJJHSEbmazKaoWAvOwd7ukxsb+HUfx+Ou1ZggyA13Z9dO07PRy B2hGCqKEjrQ4Gxwsey6NMhd33mkrPBZUsIhFJMYatvKVpescHhkzXJLJq4Sw55z8vgEL CDNTul6c6XPKAzzstA7BfEMYZD1QPZSeFagu620532gYaqEg9tfFvVCZb2Ty07wSAhVN ySTw== 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:in-reply-to:references; bh=hZU5YxHkU3BPXm/EGoWnc2P2DRdz8maIfOi1+S2ITKQ=; b=ivP1dZRfGmDxnhoTg6p7dJeLygml8ECqLneeZWdWMX5yOJFp+O1qJaQaXmSJmGAKXL Ie2ZhBae7m+ClSU232KG2PJAM9t+x8tH4aojrSwlowBfLZkvQ9pOw6xpVQpt2WD7d9c1 1bqUrGx+kRi/hfawW1EuTIXWyPTN/zHUgciSFBX0zjlCJ/Y5OaqugkuVoYLAOn40f24w 36Uaq4slMJVOJG0gbxjX0zdLigBfBNyyDpkr8NFUtJAwNuQlxKpfc/ueGyu/4Ss8H59I cQX2upS1wijn+LD1QhnHHpxaNqKkbjPLAcO+KvVeTddFA804oh1ryd9V6K8yGy6CRnXM oaYw== X-Gm-Message-State: APjAAAUfnZhte2wan2T/q/ESFMjuh0Ae7Mc7jprUBLdU3AesP1YVzQAx wfq3X0oV4YXEjRNfr7hxEWY= X-Google-Smtp-Source: APXvYqwtJxyIzM+0Lur95xbbn08J833jO87snr2ayTE6zkLZjZzC/85XdLOqOU6pNai9yJyCEFTX1w== X-Received: by 2002:a17:902:968b:: with SMTP id n11mr125690plp.120.1575451362767; Wed, 04 Dec 2019 01:22:42 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id k21sm6482914pgt.22.2019.12.04.01.22.40 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Dec 2019 01:22:42 -0800 (PST) From: Baolin Wang To: agross@kernel.org, ohad@wizery.com, bjorn.andersson@linaro.org Cc: baolin.wang7@gmail.com, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller Date: Wed, 4 Dec 2019 17:21:57 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use devm_hwspin_lock_register() to register the hwlock controller instead of unregistering the hwlock controller explicitly when removing the device. Signed-off-by: Baolin Wang --- drivers/hwspinlock/qcom_hwspinlock.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/hwspinlock/qcom_hwspinlock.c b/drivers/hwspinlock/qcom_hwspinlock.c index 5a736b0..f0da544 100644 --- a/drivers/hwspinlock/qcom_hwspinlock.c +++ b/drivers/hwspinlock/qcom_hwspinlock.c @@ -121,27 +121,12 @@ static int qcom_hwspinlock_probe(struct platform_device *pdev) regmap, field); } - return hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops, - 0, QCOM_MUTEX_NUM_LOCKS); -} - -static int qcom_hwspinlock_remove(struct platform_device *pdev) -{ - struct hwspinlock_device *bank = platform_get_drvdata(pdev); - int ret; - - ret = hwspin_lock_unregister(bank); - if (ret) { - dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret); - return ret; - } - - return 0; + return devm_hwspin_lock_register(&pdev->dev, bank, &qcom_hwspinlock_ops, + 0, QCOM_MUTEX_NUM_LOCKS); } static struct platform_driver qcom_hwspinlock_driver = { .probe = qcom_hwspinlock_probe, - .remove = qcom_hwspinlock_remove, .driver = { .name = "qcom_hwspinlock", .of_match_table = qcom_hwspinlock_of_match,