diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2016-03-14 09:07:15 +0900 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-04-05 20:35:43 +0800 |
commit | 27d80fa8bccf8d28bef4f89709638efc624fef9a (patch) | |
tree | e98cab997d441dd586c3f97447a0fe791ecf6666 /drivers/char/hw_random | |
parent | 48a61e1e2af8020f11a2b8f8dc878144477623c6 (diff) | |
download | linux-rpi-27d80fa8bccf8d28bef4f89709638efc624fef9a.tar.gz linux-rpi-27d80fa8bccf8d28bef4f89709638efc624fef9a.tar.bz2 linux-rpi-27d80fa8bccf8d28bef4f89709638efc624fef9a.zip |
hwrng: exynos - Disable runtime PM on driver unbind
Driver enabled runtime PM but did not revert this on removal. Re-binding
of a device triggered warning:
exynos-rng 10830400.rng: Unbalanced pm_runtime_enable!
Fixes: b329669ea0b5 ("hwrng: exynos - Add support for Exynos random number generator")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/exynos-rng.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index 71b45b153cf2..ed78f25e4ec6 100644 --- a/drivers/char/hw_random/exynos-rng.c +++ b/drivers/char/hw_random/exynos-rng.c @@ -156,6 +156,14 @@ static int exynos_rng_probe(struct platform_device *pdev) return ret; } +static int exynos_rng_remove(struct platform_device *pdev) +{ + pm_runtime_dont_use_autosuspend(&pdev->dev); + pm_runtime_disable(&pdev->dev); + + return 0; +} + static int __maybe_unused exynos_rng_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -213,6 +221,7 @@ static struct platform_driver exynos_rng_driver = { .of_match_table = exynos_rng_dt_match, }, .probe = exynos_rng_probe, + .remove = exynos_rng_remove, }; module_platform_driver(exynos_rng_driver); |