mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
hwrng: stm32 - fix unbalanced pm_runtime_enable
commit af0d4442dd
upstream.
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: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f6cea8a291
commit
934ff312e5
1 changed files with 8 additions and 0 deletions
|
@ -166,6 +166,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)
|
||||
{
|
||||
|
@ -202,6 +209,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);
|
||||
|
|
Loading…
Reference in a new issue