* [PATCH v3] hwrng: exynos - Fix runtime PM imbalance on error [not found] <CGME20210505182918eucas1p18a11263e5d214e3356ac65d79504e430@eucas1p1.samsung.com> @ 2021-05-05 18:29 ` Łukasz Stelmach 2021-05-05 19:46 ` Krzysztof Kozlowski 2021-05-14 11:35 ` Herbert Xu 0 siblings, 2 replies; 3+ messages in thread From: Łukasz Stelmach @ 2021-05-05 18:29 UTC (permalink / raw) To: Matt Mackall, Herbert Xu, Krzysztof Kozlowski, linux-samsung-soc, linux-crypto, linux-arm-kernel, linux-kernel Cc: Bartłomiej Żolnierkiewicz, Marek Szyprowski, Łukasz Stelmach pm_runtime_resume_and_get() wraps around pm_runtime_get_sync() and decrements the runtime PM usage counter in case the latter function fails and keeps the counter balanced. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> --- Changes in v3: - use pm_runtime_resume_and_get() Changes in v2: - removed Change-Id from the commit message drivers/char/hw_random/exynos-trng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c index 8e1fe3f8dd2d..c8db62bc5ff7 100644 --- a/drivers/char/hw_random/exynos-trng.c +++ b/drivers/char/hw_random/exynos-trng.c @@ -132,7 +132,7 @@ static int exynos_trng_probe(struct platform_device *pdev) return PTR_ERR(trng->mem); pm_runtime_enable(&pdev->dev); - ret = pm_runtime_get_sync(&pdev->dev); + ret = pm_runtime_resume_and_get(&pdev->dev); if (ret < 0) { dev_err(&pdev->dev, "Could not get runtime PM.\n"); goto err_pm_get; @@ -165,7 +165,7 @@ static int exynos_trng_probe(struct platform_device *pdev) clk_disable_unprepare(trng->clk); err_clock: - pm_runtime_put_sync(&pdev->dev); + pm_runtime_put_noidle(&pdev->dev); err_pm_get: pm_runtime_disable(&pdev->dev); -- 2.26.2 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] hwrng: exynos - Fix runtime PM imbalance on error 2021-05-05 18:29 ` [PATCH v3] hwrng: exynos - Fix runtime PM imbalance on error Łukasz Stelmach @ 2021-05-05 19:46 ` Krzysztof Kozlowski 2021-05-14 11:35 ` Herbert Xu 1 sibling, 0 replies; 3+ messages in thread From: Krzysztof Kozlowski @ 2021-05-05 19:46 UTC (permalink / raw) To: Łukasz Stelmach, Matt Mackall, Herbert Xu, linux-samsung-soc, linux-crypto, linux-arm-kernel, linux-kernel Cc: Bartłomiej Żolnierkiewicz, Marek Szyprowski On 05/05/2021 14:29, Łukasz Stelmach wrote: > pm_runtime_resume_and_get() wraps around pm_runtime_get_sync() and > decrements the runtime PM usage counter in case the latter function > fails and keeps the counter balanced. > > Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> > --- > Changes in v3: > - use pm_runtime_resume_and_get() > > Changes in v2: > - removed Change-Id from the commit message > > drivers/char/hw_random/exynos-trng.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] hwrng: exynos - Fix runtime PM imbalance on error 2021-05-05 18:29 ` [PATCH v3] hwrng: exynos - Fix runtime PM imbalance on error Łukasz Stelmach 2021-05-05 19:46 ` Krzysztof Kozlowski @ 2021-05-14 11:35 ` Herbert Xu 1 sibling, 0 replies; 3+ messages in thread From: Herbert Xu @ 2021-05-14 11:35 UTC (permalink / raw) To: Łukasz Stelmach Cc: Matt Mackall, Krzysztof Kozlowski, linux-samsung-soc, linux-crypto, linux-arm-kernel, linux-kernel, Bartłomiej Żolnierkiewicz, Marek Szyprowski On Wed, May 05, 2021 at 08:29:14PM +0200, Łukasz Stelmach wrote: > pm_runtime_resume_and_get() wraps around pm_runtime_get_sync() and > decrements the runtime PM usage counter in case the latter function > fails and keeps the counter balanced. > > Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> > --- > Changes in v3: > - use pm_runtime_resume_and_get() > > Changes in v2: > - removed Change-Id from the commit message > > drivers/char/hw_random/exynos-trng.c | 4 ++-- > 1 file changed, 2 insertions(+), 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] 3+ messages in thread
end of thread, other threads:[~2021-05-14 11:35 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20210505182918eucas1p18a11263e5d214e3356ac65d79504e430@eucas1p1.samsung.com> 2021-05-05 18:29 ` [PATCH v3] hwrng: exynos - Fix runtime PM imbalance on error Łukasz Stelmach 2021-05-05 19:46 ` Krzysztof Kozlowski 2021-05-14 11:35 ` Herbert Xu
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).