diff options
author | Guoqing Jiang <guoqing.jiang@canonical.com> | 2024-08-26 15:04:15 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-09-06 14:50:45 +0800 |
commit | 78cb66caa6ab5385ac2090f1aae5f3c19e08f522 (patch) | |
tree | c0d185e07b85317d142a172b2ed327b8aab8d16f /drivers/char | |
parent | b8fc70ab7b5f3afbc4fb0587782633d7fcf1e069 (diff) | |
download | linux-stable-78cb66caa6ab5385ac2090f1aae5f3c19e08f522.tar.gz linux-stable-78cb66caa6ab5385ac2090f1aae5f3c19e08f522.tar.bz2 linux-stable-78cb66caa6ab5385ac2090f1aae5f3c19e08f522.zip |
hwrng: mtk - Use devm_pm_runtime_enable
Replace pm_runtime_enable with the devres-enabled version which
can trigger pm_runtime_disable.
Otherwise, the below appears during reload driver.
mtk_rng 1020f000.rng: Unbalanced pm_runtime_enable!
Fixes: 81d2b34508c6 ("hwrng: mtk - add runtime PM support")
Cc: <stable@vger.kernel.org>
Suggested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Guoqing Jiang <guoqing.jiang@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hw_random/mtk-rng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/mtk-rng.c b/drivers/char/hw_random/mtk-rng.c index aa993753ab12..1e3048f2bb38 100644 --- a/drivers/char/hw_random/mtk-rng.c +++ b/drivers/char/hw_random/mtk-rng.c @@ -142,7 +142,7 @@ static int mtk_rng_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, priv); pm_runtime_set_autosuspend_delay(&pdev->dev, RNG_AUTOSUSPEND_TIMEOUT); pm_runtime_use_autosuspend(&pdev->dev); - pm_runtime_enable(&pdev->dev); + devm_pm_runtime_enable(&pdev->dev); dev_info(&pdev->dev, "registered RNG driver\n"); |