From patchwork Mon Nov 13 14:45:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 118797 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1880106qgn; Mon, 13 Nov 2017 06:47:40 -0800 (PST) X-Google-Smtp-Source: AGs4zMZfUoKskkub+j9kUalYujcF8FayiQtHJ9XdiSp0+B//MwRRwysu2Um3+ZNXCCkfMmyxGNYC X-Received: by 10.99.97.200 with SMTP id v191mr8505391pgb.300.1510584460792; Mon, 13 Nov 2017 06:47:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510584460; cv=none; d=google.com; s=arc-20160816; b=bozGkw9pEHqv9VCC40qlVqLieqtodRxjNGWrMSSHYeXhpyS7ldNNogp0YIzqFNtDPR bnmxFfdRiRxCL+ug93e4nshMS1BV/P+hEvFP4DQ0nyF8gCr+6DQ+gJkjPHMxZXQH33SF mGzuw4yvDJ2ZXjOcRGNHAJkJtA3M8nke8oVU0tRSF5u2X/Hrcs2Q1Z80X1MK8MlHGQZE 5h60NfK0g6zsguhYZmp88npQl1Dy5awvC3qhTjulHPTUCuiCncCipgpfZ5gfrJUVhB7H jJfeYXW/WuOkda+aJ6BZZnzDp67/+1WFe+hSFVGInwx93Y0hPao3yxsGTcM3NaTrLgxD 53xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=9jARfgFBmfKg9XGymtOkdCQcX2rLakfJY0sNRDn87aM=; b=y7Uo/4dhowotPd08HREjhR7R23moTq4pnKSH5NS+jCrWOq6VWJl7Ur/4v17gQhw97W cvh5UtcfvWa5dDwDDtJmypCalcpkQNOo9u6LNY7P9kctJnqyy+BBP/WoOFEd38ESeDqR IfaRAMSf0wpf/CDPjNphAHK3Lb5Y6wEaOj3TNftQDABVGH3MxbxBRfhplkQnwMQGTT5L ZeKZhrqtX70mBxLOUOGoN0xhNshWiTVYDk5UwjHja1v3MFcG4/o61O6yER1O4UUaPVXb LQaEcFa+ZZYUVbZxM3peHPEApGB54mQ7VBtpY/XuM1GL5cDFca5pXiQDVxBj4W8AEO8k F/7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c30si13739937pgn.815.2017.11.13.06.47.40; Mon, 13 Nov 2017 06:47:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753394AbdKMOri (ORCPT + 27 others); Mon, 13 Nov 2017 09:47:38 -0500 Received: from foss.arm.com ([217.140.101.70]:47382 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752260AbdKMOrg (ORCPT ); Mon, 13 Nov 2017 09:47:36 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4516D1435; Mon, 13 Nov 2017 06:47:36 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A0FF53F318; Mon, 13 Nov 2017 06:47:34 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/24] staging: ccree: Replace CONFIG_PM_RUNTIME with CONFIG_PM Date: Mon, 13 Nov 2017 14:45:41 +0000 Message-Id: <1510584358-29473-14-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510584358-29473-1-git-send-email-gilad@benyossef.com> References: <1510584358-29473-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After commit b2b49ccbdd54 ("PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected") PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 4 ++-- drivers/staging/ccree/ssi_pm.c | 6 +++--- drivers/staging/ccree/ssi_pm.h | 2 +- drivers/staging/ccree/ssi_request_mgr.c | 14 +++++++------- drivers/staging/ccree/ssi_request_mgr.h | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c index 0d5c1a9..8d16823 100644 --- a/drivers/staging/ccree/ssi_driver.c +++ b/drivers/staging/ccree/ssi_driver.c @@ -495,13 +495,13 @@ static int cc7x_remove(struct platform_device *plat_dev) return 0; } -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) static const struct dev_pm_ops arm_cc7x_driver_pm = { SET_RUNTIME_PM_OPS(cc_pm_suspend, cc_pm_resume, NULL) }; #endif -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) #define DX_DRIVER_RUNTIME_PM (&arm_cc7x_driver_pm) #else #define DX_DRIVER_RUNTIME_PM NULL diff --git a/drivers/staging/ccree/ssi_pm.c b/drivers/staging/ccree/ssi_pm.c index 86d403d..5e2ef5e 100644 --- a/drivers/staging/ccree/ssi_pm.c +++ b/drivers/staging/ccree/ssi_pm.c @@ -29,7 +29,7 @@ #include "ssi_hash.h" #include "ssi_pm.h" -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) #define POWER_DOWN_ENABLE 0x01 #define POWER_DOWN_DISABLE 0x00 @@ -119,7 +119,7 @@ int cc_pm_put_suspend(struct device *dev) int cc_pm_init(struct ssi_drvdata *drvdata) { int rc = 0; -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) struct device *dev = drvdata_to_dev(drvdata); /* must be before the enabling to avoid resdundent suspending */ @@ -137,7 +137,7 @@ int cc_pm_init(struct ssi_drvdata *drvdata) void cc_pm_fini(struct ssi_drvdata *drvdata) { -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) pm_runtime_disable(drvdata_to_dev(drvdata)); #endif } diff --git a/drivers/staging/ccree/ssi_pm.h b/drivers/staging/ccree/ssi_pm.h index 557ec98..50bcf03 100644 --- a/drivers/staging/ccree/ssi_pm.h +++ b/drivers/staging/ccree/ssi_pm.h @@ -29,7 +29,7 @@ int cc_pm_init(struct ssi_drvdata *drvdata); void cc_pm_fini(struct ssi_drvdata *drvdata); -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) int cc_pm_suspend(struct device *dev); int cc_pm_resume(struct device *dev); diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index 1d9c038..ab18851 100644 --- a/drivers/staging/ccree/ssi_request_mgr.c +++ b/drivers/staging/ccree/ssi_request_mgr.c @@ -58,7 +58,7 @@ struct ssi_request_mgr_handle { #else struct tasklet_struct comptask; #endif -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) bool is_runtime_suspended; #endif }; @@ -277,7 +277,7 @@ int send_request( SSI_IVPOOL_SEQ_LEN) + (!is_dout ? 1 : 0)); -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) rc = cc_pm_get(dev); if (rc) { dev_err(dev, "ssi_power_mgr_runtime_get returned %x\n", rc); @@ -304,7 +304,7 @@ int send_request( /* Any error other than HW queue full * (SW queue is full) */ -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) cc_pm_put_suspend(dev); #endif return rc; @@ -340,7 +340,7 @@ int send_request( if (unlikely(rc)) { dev_err(dev, "Failed to generate IV (rc=%d)\n", rc); spin_unlock_bh(&req_mgr_h->hw_lock); -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) cc_pm_put_suspend(dev); #endif return rc; @@ -469,7 +469,7 @@ static void proc_completions(struct ssi_drvdata *drvdata) struct device *dev = drvdata_to_dev(drvdata); struct ssi_request_mgr_handle *request_mgr_handle = drvdata->request_mgr_handle; -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) int rc = 0; #endif @@ -513,7 +513,7 @@ static void proc_completions(struct ssi_drvdata *drvdata) request_mgr_handle->req_queue_tail); dev_dbg(dev, "Request completed. axi_completed=%d\n", request_mgr_handle->axi_completed); -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) rc = cc_pm_put_suspend(dev); if (rc) dev_err(dev, "Failed to set runtime suspension %d\n", @@ -579,7 +579,7 @@ static void comp_handler(unsigned long devarg) * resume the queue configuration - no need to take the lock as this happens inside * the spin lock protection */ -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) int cc_resume_req_queue(struct ssi_drvdata *drvdata) { struct ssi_request_mgr_handle *request_mgr_handle = drvdata->request_mgr_handle; diff --git a/drivers/staging/ccree/ssi_request_mgr.h b/drivers/staging/ccree/ssi_request_mgr.h index 23883e2..53eed5f 100644 --- a/drivers/staging/ccree/ssi_request_mgr.h +++ b/drivers/staging/ccree/ssi_request_mgr.h @@ -49,7 +49,7 @@ void complete_request(struct ssi_drvdata *drvdata); void request_mgr_fini(struct ssi_drvdata *drvdata); -#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) +#if defined(CONFIG_PM) int cc_resume_req_queue(struct ssi_drvdata *drvdata); int cc_suspend_req_queue(struct ssi_drvdata *drvdata);