From: Greg Kroah-Hartman Date: Tue, 3 Dec 2019 19:56:41 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v5.4.2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ebf01c1323e701a34cde606263c0fcd433c1eae4;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: hwrng-stm32-fix-unbalanced-pm_runtime_enable.patch --- 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 index 00000000000..d891bf1dbd9 --- /dev/null +++ b/queue-4.9/hwrng-stm32-fix-unbalanced-pm_runtime_enable.patch @@ -0,0 +1,46 @@ +From af0d4442dd6813de6e77309063beb064fa8e89ae Mon Sep 17 00:00:00 2001 +From: Lionel Debieve +Date: Mon, 1 Apr 2019 12:30:45 +0200 +Subject: hwrng: stm32 - fix unbalanced pm_runtime_enable + +From: Lionel Debieve + +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 +Signed-off-by: Herbert Xu +Signed-off-by: Mathieu Poirier +Signed-off-by: Greg Kroah-Hartman + +--- + 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); diff --git a/queue-4.9/series b/queue-4.9/series index 1641cb3c90f..ad95909b7f5 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -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