Skip to content

Commit 78cb66c

Browse files
gjiangcanonicalherbertx
authored andcommitted
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: 81d2b34 ("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>
1 parent b8fc70a commit 78cb66c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/char/hw_random/mtk-rng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static int mtk_rng_probe(struct platform_device *pdev)
142142
dev_set_drvdata(&pdev->dev, priv);
143143
pm_runtime_set_autosuspend_delay(&pdev->dev, RNG_AUTOSUSPEND_TIMEOUT);
144144
pm_runtime_use_autosuspend(&pdev->dev);
145-
pm_runtime_enable(&pdev->dev);
145+
devm_pm_runtime_enable(&pdev->dev);
146146

147147
dev_info(&pdev->dev, "registered RNG driver\n");
148148

0 commit comments

Comments
 (0)