]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Sep 2016 06:26:44 +0000 (08:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Sep 2016 06:26:44 +0000 (08:26 +0200)
added patches:
pwm-mark-all-devices-as-might-sleep.patch

queue-4.4/pwm-mark-all-devices-as-might-sleep.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/pwm-mark-all-devices-as-might-sleep.patch b/queue-4.4/pwm-mark-all-devices-as-might-sleep.patch
new file mode 100644 (file)
index 0000000..5942098
--- /dev/null
@@ -0,0 +1,40 @@
+From ff01c944cfa939f3474c28d88223213494aedf0b Mon Sep 17 00:00:00 2001
+From: Thierry Reding <thierry.reding@gmail.com>
+Date: Thu, 21 Jan 2016 15:04:59 +0100
+Subject: pwm: Mark all devices as "might sleep"
+
+From: Thierry Reding <thierry.reding@gmail.com>
+
+commit ff01c944cfa939f3474c28d88223213494aedf0b upstream.
+
+Commit d1cd21427747 ("pwm: Set enable state properly on failed call to
+enable") introduced a mutex that is needed to protect internal state of
+PWM devices. Since that mutex is acquired in pwm_set_polarity() and in
+pwm_enable() and might potentially block, all PWM devices effectively
+become "might sleep".
+
+It's rather pointless to keep the .can_sleep field around, but given
+that there are external users let's postpone the removal for the next
+release cycle.
+
+Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Fixes: d1cd21427747 ("pwm: Set enable state properly on failed call to enable")
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+
+
+---
+ drivers/pwm/core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/pwm/core.c
++++ b/drivers/pwm/core.c
+@@ -889,7 +889,7 @@ EXPORT_SYMBOL_GPL(devm_pwm_put);
+   */
+ bool pwm_can_sleep(struct pwm_device *pwm)
+ {
+-      return pwm->chip->can_sleep;
++      return true;
+ }
+ EXPORT_SYMBOL_GPL(pwm_can_sleep);
index 80b9cd969d9344567af6bd540dde95f6ff6f4dee..6bd4c8c643389d7e54baff034cc08dee2b068770 100644 (file)
@@ -40,3 +40,4 @@ net-dsa-bcm_sf2-fix-race-condition-while-unmasking-interrupts.patch
 revert-phy-irq-cannot-be-shared.patch
 net-smc91x-fix-smc-accesses.patch
 bridge-re-introduce-fix-parsing-of-mldv2-reports.patch
+pwm-mark-all-devices-as-might-sleep.patch