diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2016-01-21 15:04:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-30 10:18:37 +0200 |
commit | 9aea5e0ded7355172d751cdcacf59aa06d0d036e (patch) | |
tree | 518a3977794ccd9c6dc621276c2be56da1f660c7 | |
parent | fd2e3102adb91a481e34923633b1c0fd0fa77f0b (diff) | |
download | lwn-9aea5e0ded7355172d751cdcacf59aa06d0d036e.tar.gz lwn-9aea5e0ded7355172d751cdcacf59aa06d0d036e.zip |
pwm: Mark all devices as "might sleep"
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>
-rw-r--r-- | drivers/pwm/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index d24ca5f281b4..7831bc6b51dd 100644 --- 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); |