Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1355667
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/5] hwrng: exynos - Disable runtime PM on driver unbind |
| Date | 2016-03-11 09:00 +0100 |
| Message-ID | <rbq9k-2WM-5@gated-at.bofh.it> (permalink) |
| References | <rbpZD-2SL-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
drivers/char/hw_random/exynos-rng.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c
index 68c349bf66a0..cba1ff538c46 100644
--- a/drivers/char/hw_random/exynos-rng.c
+++ b/drivers/char/hw_random/exynos-rng.c
@@ -154,6 +154,13 @@ static int exynos_rng_probe(struct platform_device *pdev)
return ret;
}
+static int exynos_rng_remove(struct platform_device *pdev)
+{
+ 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);
@@ -211,6 +218,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);
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/5] hwrng: exynos - Hide PM functions with __maybe_unused Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-11 08:50 +0100
[PATCH 5/5] hwrng: exynos - Disable runtime PM on driver unbind Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-11 09:00 +0100
Re: [PATCH 5/5] hwrng: exynos - Disable runtime PM on driver unbind Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-12 06:30 +0100
[PATCH 4/5] hwrng: exynos - Disable runtime PM on probe failure Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-11 09:00 +0100
[PATCH 3/5] hwrng: exynos - Fix unbalanced PM runtime put on timeout error path Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-11 09:00 +0100
[PATCH 2/5] hwrng: exynos - Runtime suspend device after init Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-11 09:00 +0100
Re: [PATCH 1/5] hwrng: exynos - Hide PM functions with __maybe_unused Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-03-12 06:00 +0100
csiph-web