hwrng: mtk - Use devm_pm_runtime_enable
authorGuoqing Jiang <guoqing.jiang@canonical.com>
Mon, 26 Aug 2024 07:04:15 +0000 (15:04 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 Sep 2024 06:50:45 +0000 (14:50 +0800)
commit78cb66caa6ab5385ac2090f1aae5f3c19e08f522
treec0d185e07b85317d142a172b2ed327b8aab8d16f
parentb8fc70ab7b5f3afbc4fb0587782633d7fcf1e069
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>
drivers/char/hw_random/mtk-rng.c