From patchwork Wed Jan 8 03:09:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 11322555 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 C1108138C for ; Wed, 8 Jan 2020 03:09:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F0E22081E for ; Wed, 8 Jan 2020 03:09:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ulKXQbtk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbgAHDJx (ORCPT ); Tue, 7 Jan 2020 22:09:53 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:37901 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbgAHDJw (ORCPT ); Tue, 7 Jan 2020 22:09:52 -0500 Received: by mail-pf1-f194.google.com with SMTP id x185so868158pfc.5; Tue, 07 Jan 2020 19:09:52 -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=ulKXQbtk+t8XB6gLF/Zmv9Mm7i7wCNKwFB5T/XGWM9AvACYQm/cJ0YYFe9etDzPGSS Eb3sVDFd+UmtABt1Py1aoYqN1/SAFABUqvxYnQ58VwK+fu5dRgnMJSisbz6rcNIi5TuD 2oocoYv1mF0fKnP62uYLl6vTBadn4l77gACj3oR+fPgqbcuI+Xg/hxlQYy8C52nrNloA md5f5bUJAPHpIF1Y+nR+nh/G6S5p4NkFM7kHIE9U9IpEBF9LzazeBymgoTYVvQJ3cTWL wimOEhZfx1XsXuyPKrVADRza5adGm+KUm+0rt5gaN6ZohrK3NSZJ8fS4xRkQRZ0nek61 h9CQ== 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=fXh5bDpBphOkzDLNPMfwJogmuza452Lrd+qIPrtAav9LevlaZiWNn4Z9rPMykMBf40 Kg1vEX+7d5+pLMEdYIQ4zjjKbdi5X+dWg+K2O79ik3jpSNPKACAy57tvoDf54WVv+eTl wPPkiclb7gpWoICo/9dMt8LXa2UZE6HrA5Z+pU9H2F12dKRqJNpVvApsfqhpqfH/HHE0 FRj5iUoLTNGEyVtEANCDNfkZTMbtjSJ7qVKFpG8/dU9CVke85r0sZjGEJURy9jtlhMGr 8g1D/uWY/1/WI4a8x3nOK5BBkbNG4VBwWucDhuVtfff9cfxPHrwgyoxgHvdUZdG6RSur p4Cw== X-Gm-Message-State: APjAAAVLgsrIw3yvhaYZQEQNIzCNBsA5gafahuWbd9QDMV8mUmOAa9M5 /TTqnD51R7DyzUcUN+x4cQY= X-Google-Smtp-Source: APXvYqzIITygVqcsJnMx10npadcd03iO3OaNin1dHDbrW8XmdcDQ/S8g3YNJ2Mmr1hO0PukoPb1m0w== X-Received: by 2002:aa7:8191:: with SMTP id g17mr2803828pfi.25.1578452992158; Tue, 07 Jan 2020 19:09:52 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id l8sm946980pjy.24.2020.01.07.19.09.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jan 2020 19:09:51 -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 RESEND 1/2] hwspinlock: qcom: Remove redundant PM runtime functions Date: Wed, 8 Jan 2020 11:09:10 +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 Jan 8 03:09:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 11322561 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 F0C7C1580 for ; Wed, 8 Jan 2020 03:09:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF70F2077B for ; Wed, 8 Jan 2020 03:09:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r9s5L3T1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbgAHDJ5 (ORCPT ); Tue, 7 Jan 2020 22:09:57 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:37250 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbgAHDJ4 (ORCPT ); Tue, 7 Jan 2020 22:09:56 -0500 Received: by mail-pl1-f195.google.com with SMTP id c23so517053plz.4; Tue, 07 Jan 2020 19:09:56 -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=r9s5L3T11EwmGK8s+uj6IfNr8tKsayCKEi9uM0itMZUjvH5vHw2n8fXuLmefjLMshG sXZfsZFD1cV+vrrYIWDeHPt6oFGh51bbVcd+ZurxPA1ucQwPwkNDzryArNk/YB3aHKWd ZB6XyY45Sxk4sEz48gGciTCiMo5ep16wgMEmPyN9fcPT3roGf+RBEBpSnb9xizqJ/AxV F6a2Fw+jovC/P7UYEYsbxJOUr7x+ePqaZfO7XTkCO1RK3gBFsfTXdCcN/6QQGDvXw2U4 aVuMgOFpKOeY7VXU/6EUXpEkTKblbsTXti9hbGfAWPrTT+UeKYMwTNFmSNiTHFK2qv6e cPPg== 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=DMIeB2PSnekh1AHpkfjDIiG9kCK5K7N1titdfjsC7Vqd5yE19uFOm0HMZxv0uqPzNF A9m4SYPTSOUChYWiDAOjN/DbQcip77j/bD8xUVUNRsJlBV1P9Jp0FjHhFKeRDLKve+75 xMLkJTz9ZWfna3TW5PIOgy/CcZAORht715fPpmO5oKb9QEfppruq/tGtQDSsNSWne77e OG8/SiHaR3Z4n7ejCbiRmBmWktlF1LRLHKeStsftpuINNCAfRxK+YAWLQDT4JpwZjbX0 y+/77NZbYoUCIa+3fT8TAejtytq/qUeLpZyvqw3R2L8TQAmvkxbfNRsXHP1OBSkLEVqu mfKw== X-Gm-Message-State: APjAAAWidQMkkVYMLGbuDQfxPuclmdIu9GIofLnkaE51RL3TLIZryClX GNqlZ+PsRN3JqPvAyCE2FwSceeGne0M= X-Google-Smtp-Source: APXvYqz+aQ8I/zfUUYqbpZQhlWeuQoPfStzqT/fUpcarS/+IQmWbOXTujKDTFiGiHJiOsEOfaa9bkA== X-Received: by 2002:a17:902:a9ca:: with SMTP id b10mr3075322plr.23.1578452995858; Tue, 07 Jan 2020 19:09:55 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id l8sm946980pjy.24.2020.01.07.19.09.52 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jan 2020 19:09:55 -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 RESEND 2/2] hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller Date: Wed, 8 Jan 2020 11:09:11 +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,