linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "David S . Miller" <davem@davemloft.net>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Cc: linux-crypto@vger.kernel.org, Lokesh Vutla <lokeshvutla@ti.com>,
	Tero Kristo <kristo@kernel.org>
Subject: [PATCH 5/6] crypto: omap-sham - drop suspend and resume functions
Date: Tue, 27 Jul 2021 13:23:38 +0300	[thread overview]
Message-ID: <20210727102339.49141-5-tony@atomide.com> (raw)
In-Reply-To: <20210727102339.49141-1-tony@atomide.com>

Let's get rid of the suspend and resume calls to runtime PM as these calls
do not idle the hardware. The runtime suspend has been disabled for
system suspend since commit 88d26136a256 ("PM: Prevent runtime suspend
during system resume").

Instead of runtime PM, the system suspend and resume functions should call
driver internal shared functions to idle the hardware as needed.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Tero Kristo <kristo@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/crypto/omap-sham.c | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -2221,32 +2221,11 @@ static int omap_sham_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int omap_sham_suspend(struct device *dev)
-{
-	pm_runtime_put_sync(dev);
-	return 0;
-}
-
-static int omap_sham_resume(struct device *dev)
-{
-	int err = pm_runtime_resume_and_get(dev);
-	if (err < 0) {
-		dev_err(dev, "failed to get sync: %d\n", err);
-		return err;
-	}
-	return 0;
-}
-#endif
-
-static SIMPLE_DEV_PM_OPS(omap_sham_pm_ops, omap_sham_suspend, omap_sham_resume);
-
 static struct platform_driver omap_sham_driver = {
 	.probe	= omap_sham_probe,
 	.remove	= omap_sham_remove,
 	.driver	= {
 		.name	= "omap-sham",
-		.pm	= &omap_sham_pm_ops,
 		.of_match_table	= omap_sham_of_match,
 	},
 };
-- 
2.32.0

  parent reply	other threads:[~2021-07-27 10:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 10:23 [PATCH 1/6] crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop() Tony Lindgren
2021-07-27 10:23 ` [PATCH 2/6] crypto: omap-sham - initialize req only after omap_sham_hw_init() Tony Lindgren
2021-07-27 10:23 ` [PATCH 3/6] crypto: omap-sham - add missing pm_runtime_dontuse_autosuspend() Tony Lindgren
2021-07-27 10:23 ` [PATCH 4/6] crypto: omap-sham - drop old hw_init and unused FLAGS_INIT Tony Lindgren
2021-07-27 10:23 ` Tony Lindgren [this message]
2021-07-27 10:23 ` [PATCH 6/6] crypto: omap-sham - drop pm_runtime_irqsafe() usage Tony Lindgren
2021-08-06 12:14 ` [PATCH 1/6] crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop() Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210727102339.49141-5-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kristo@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).