pwm: Mark all devices as "might sleep"
authorThierry Reding <thierry.reding@gmail.com>
Thu, 21 Jan 2016 14:04:59 +0000 (15:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Sep 2016 08:18:37 +0000 (10:18 +0200)
commit9aea5e0ded7355172d751cdcacf59aa06d0d036e
tree518a3977794ccd9c6dc621276c2be56da1f660c7
parentfd2e3102adb91a481e34923633b1c0fd0fa77f0b
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>
drivers/pwm/core.c