All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwrng: ks-sa - Use pm_runtime_resume_and_get() to replace open coding
@ 2021-05-24 12:28 Tian Tao
  2021-06-03 12:29 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2021-05-24 12:28 UTC (permalink / raw)
  To: mpm, herbert; +Cc: linux-crypto, Tian Tao

use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. this change is just to simplify the code, no
actual functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/char/hw_random/ks-sa-rng.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/ks-sa-rng.c b/drivers/char/hw_random/ks-sa-rng.c
index 8f1d47f..2f2f21f 100644
--- a/drivers/char/hw_random/ks-sa-rng.c
+++ b/drivers/char/hw_random/ks-sa-rng.c
@@ -241,10 +241,9 @@ static int ks_sa_rng_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_enable(dev);
-	ret = pm_runtime_get_sync(dev);
+	ret = pm_runtime_resume_and_get(dev);
 	if (ret < 0) {
 		dev_err(dev, "Failed to enable SA power-domain\n");
-		pm_runtime_put_noidle(dev);
 		pm_runtime_disable(dev);
 		return ret;
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwrng: ks-sa - Use pm_runtime_resume_and_get() to replace open coding
  2021-05-24 12:28 [PATCH] hwrng: ks-sa - Use pm_runtime_resume_and_get() to replace open coding Tian Tao
@ 2021-06-03 12:29 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2021-06-03 12:29 UTC (permalink / raw)
  To: Tian Tao; +Cc: mpm, linux-crypto

On Mon, May 24, 2021 at 08:28:38PM +0800, Tian Tao wrote:
> use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
> pm_runtime_put_noidle. this change is just to simplify the code, no
> actual functional changes.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
>  drivers/char/hw_random/ks-sa-rng.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-03 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 12:28 [PATCH] hwrng: ks-sa - Use pm_runtime_resume_and_get() to replace open coding Tian Tao
2021-06-03 12:29 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.