Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5326695ybv; Tue, 11 Feb 2020 13:34:34 -0800 (PST) X-Google-Smtp-Source: APXvYqx+T+JwgNCXl5JDIOUS+XQkjKvtEaHCw4e7q7JUpgu9Dfqf2eoM8RbUawoMftO0OJ7qTtbX X-Received: by 2002:aca:b187:: with SMTP id a129mr4246491oif.175.1581456874392; Tue, 11 Feb 2020 13:34:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581456874; cv=none; d=google.com; s=arc-20160816; b=VwJuyzpFVT2jx1KB53xeHCIvgJrByAtpncpWJAdz4rJGskEVhUjgfSlLWX7ImMrWNJ L4Mi+A4z5wBYLxSZXGd6wcxppKmSvPQP/JGJWCAJPq+48qGL0BCB2/yAL7d/7VuxgkVD nbOXaqPRuFNQowwY9UpFkk2uoVApzrt+0kGnbOgJGYA/DlfNhzAq2w6LY0MzFRtwAco/ x2FWtg8l13gRxJMv0O07Za2IGhMrQiG24NSaVWSrbXG6RkHxIT/C3NXM73nyqrCG2a0G qb1XlDyMqS0J1gJH4rLAdOdL3miNsfV6JNGJEN9EENvPtBEKQGu1pCm7+eKROdxDIWUv mtbQ== 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; bh=zaRDlKMPLAdVO08AdYqh2jkESFjLjyW1Sv1UH0W+fn4=; b=qRdokqRLeWhsXhaxDs1zN0tNnid3b2EiXEJ9u/mMrBy0J9y9oeJ3BYAUlSaF/CSrlS FItudXn1MUWZ833eIjX1FYgdmNo5FBscS7gF90BKwNG7rSPo1nOr9Og9w9t/kTP4FQn/ /pBV2Y8LsxSWR1MMXQD+IylmtNL2a4DR/7o4PaNRzIhuATZx/SGMN7o01CKokpaiQG+b yaOHhPfWsmHr8GjmHikXVHzTKCwOo7ijx6ZjBcAMPd/FJdMZVD4Y3t226SV+/zWJjkg4 vDjpY2f6VjJ8OzUgvV5QGntfNqTVLrpkYuVkFUJyuBylvH+1ngINXlQz7F69qEUT6UGV Tjmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 p19si2630692otk.251.2020.02.11.13.34.23; Tue, 11 Feb 2020 13:34:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729146AbgBKSUY (ORCPT + 99 others); Tue, 11 Feb 2020 13:20:24 -0500 Received: from baptiste.telenet-ops.be ([195.130.132.51]:52108 "EHLO baptiste.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728997AbgBKSTd (ORCPT ); Tue, 11 Feb 2020 13:19:33 -0500 Received: from ramsan ([84.195.182.253]) by baptiste.telenet-ops.be with bizsmtp id 1WKW220025USYZQ01WKW7D; Tue, 11 Feb 2020 19:19:30 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1j1a89-0002oP-TR; Tue, 11 Feb 2020 19:19:29 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1j1a89-0003yq-S2; Tue, 11 Feb 2020 19:19:29 +0100 From: Geert Uytterhoeven To: Gilad Ben-Yossef , Herbert Xu , "David S . Miller" Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , linux-crypto@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2 16/34] crypto: ccree - remove cc_pm_is_dev_suspended() wrapper Date: Tue, 11 Feb 2020 19:19:10 +0100 Message-Id: <20200211181928.15178-17-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200211181928.15178-1-geert+renesas@glider.be> References: <20200211181928.15178-1-geert+renesas@glider.be> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org If CONFIG_PM=y, cc_pm_is_dev_suspended() is just a wrapper around pm_runtime_suspended(). If CONFIG_PM=n, cc_pm_is_dev_suspended() a dummy that behaves exactly the same as the dummy for pm_runtime_suspended(). Hence remove cc_pm_is_dev_suspended(), and call pm_runtime_suspended() directly. Signed-off-by: Geert Uytterhoeven --- v2: - New. drivers/crypto/ccree/cc_driver.c | 2 +- drivers/crypto/ccree/cc_pm.c | 6 ------ drivers/crypto/ccree/cc_pm.h | 7 ------- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/crypto/ccree/cc_driver.c b/drivers/crypto/ccree/cc_driver.c index e365ede32cc0e6a0..02442596310cd98d 100644 --- a/drivers/crypto/ccree/cc_driver.c +++ b/drivers/crypto/ccree/cc_driver.c @@ -136,7 +136,7 @@ static irqreturn_t cc_isr(int irq, void *dev_id) /* STAT_OP_TYPE_GENERIC STAT_PHASE_0: Interrupt */ /* if driver suspended return, probably shared interrupt */ - if (cc_pm_is_dev_suspended(dev)) + if (pm_runtime_suspended(dev)) return IRQ_NONE; /* read the interrupt status */ diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c index f7729fc1ee597e9a..3b4927c41a177752 100644 --- a/drivers/crypto/ccree/cc_pm.c +++ b/drivers/crypto/ccree/cc_pm.c @@ -74,9 +74,3 @@ void cc_pm_put_suspend(struct device *dev) pm_runtime_mark_last_busy(dev); pm_runtime_put_autosuspend(dev); } - -bool cc_pm_is_dev_suspended(struct device *dev) -{ - /* check device state using runtime api */ - return pm_runtime_suspended(dev); -} diff --git a/drivers/crypto/ccree/cc_pm.h b/drivers/crypto/ccree/cc_pm.h index 2dcf53fa108e77a6..1fe1fc827f62f49e 100644 --- a/drivers/crypto/ccree/cc_pm.h +++ b/drivers/crypto/ccree/cc_pm.h @@ -19,7 +19,6 @@ int cc_pm_suspend(struct device *dev); int cc_pm_resume(struct device *dev); int cc_pm_get(struct device *dev); void cc_pm_put_suspend(struct device *dev); -bool cc_pm_is_dev_suspended(struct device *dev); #else @@ -30,12 +29,6 @@ static inline int cc_pm_get(struct device *dev) static inline void cc_pm_put_suspend(struct device *dev) {} -static inline bool cc_pm_is_dev_suspended(struct device *dev) -{ - /* if PM not supported device is never suspend */ - return false; -} - #endif #endif /*__POWER_MGR_H__*/ -- 2.17.1