提交 af0d4442 编写于 作者: L Lionel Debieve 提交者: Herbert Xu

hwrng: stm32 - fix unbalanced pm_runtime_enable

No remove function implemented yet in the driver.
Without remove function, the pm_runtime implementation
complains when removing and probing again the driver.
Signed-off-by: NLionel Debieve <lionel.debieve@st.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 eda69b0c
......@@ -169,6 +169,13 @@ static int stm32_rng_probe(struct platform_device *ofdev)
return devm_hwrng_register(dev, &priv->rng);
}
static int stm32_rng_remove(struct platform_device *ofdev)
{
pm_runtime_disable(&ofdev->dev);
return 0;
}
#ifdef CONFIG_PM
static int stm32_rng_runtime_suspend(struct device *dev)
{
......@@ -210,6 +217,7 @@ static struct platform_driver stm32_rng_driver = {
.of_match_table = stm32_rng_match,
},
.probe = stm32_rng_probe,
.remove = stm32_rng_remove,
};
module_platform_driver(stm32_rng_driver);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册