Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pwm: Mark all devices as "might sleep"

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>

+1 -1
+1 -1
drivers/pwm/core.c
··· 889 889 */ 890 890 bool pwm_can_sleep(struct pwm_device *pwm) 891 891 { 892 - return pwm->chip->can_sleep; 892 + return true; 893 893 } 894 894 EXPORT_SYMBOL_GPL(pwm_can_sleep); 895 895