]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2019 19:56:41 +0000 (20:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2019 19:56:41 +0000 (20:56 +0100)
added patches:
hwrng-stm32-fix-unbalanced-pm_runtime_enable.patch

queue-4.9/hwrng-stm32-fix-unbalanced-pm_runtime_enable.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/hwrng-stm32-fix-unbalanced-pm_runtime_enable.patch b/queue-4.9/hwrng-stm32-fix-unbalanced-pm_runtime_enable.patch
new file mode 100644 (file)
index 0000000..d891bf1
--- /dev/null
@@ -0,0 +1,46 @@
+From af0d4442dd6813de6e77309063beb064fa8e89ae Mon Sep 17 00:00:00 2001
+From: Lionel Debieve <lionel.debieve@st.com>
+Date: Mon, 1 Apr 2019 12:30:45 +0200
+Subject: hwrng: stm32 - fix unbalanced pm_runtime_enable
+
+From: Lionel Debieve <lionel.debieve@st.com>
+
+commit af0d4442dd6813de6e77309063beb064fa8e89ae 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>
+
+---
+ drivers/char/hw_random/stm32-rng.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/char/hw_random/stm32-rng.c
++++ b/drivers/char/hw_random/stm32-rng.c
+@@ -166,6 +166,13 @@ static int stm32_rng_probe(struct platfo
+       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_
+               .of_match_table = stm32_rng_match,
+       },
+       .probe = stm32_rng_probe,
++      .remove = stm32_rng_remove,
+ };
+ module_platform_driver(stm32_rng_driver);
index 1641cb3c90f37bc23b1f5692b00a3ab68dfd373b..ad95909b7f5483743792ddc55de7345221ba0c1d 100644 (file)
@@ -120,3 +120,4 @@ tipc-fix-link-name-length-check.patch
 sctp-cache-netns-in-sctp_ep_common.patch
 net-sched-fix-tc-s-class-show-no-bstats-on-class-with-nolock-subqueues.patch
 hid-core-check-whether-usage-page-item-is-after-usage-id-items.patch
+hwrng-stm32-fix-unbalanced-pm_runtime_enable.patch