Skip to content

Commit

Permalink
pwm: Mark all devices as "might sleep"
Browse files Browse the repository at this point in the history
Commit d1cd214 ("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>
  • Loading branch information
Thierry Reding committed Jan 21, 2016
1 parent 0747264 commit ff01c94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pwm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ff01c94

Please sign in to comment.