Skip to content

Commit c2e64ba

Browse files
committed
pwm: Add pwm_apply_state() compatibility stub
In order to make the transition to the new pwm_apply_might_sleep() a bit smoother, add a compatibility stub. This will prevent new calls to the old function introduced via other subsystems from breaking builds. Once the next merge window has closed we can take another stab at removing the stub. Reviewed-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 8817918 commit c2e64ba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/linux/pwm.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,13 @@ static inline void pwm_apply_args(struct pwm_device *pwm)
537537
pwm_apply_might_sleep(pwm, &state);
538538
}
539539

540+
/* only for backwards-compatibility, new code should not use this */
541+
static inline int pwm_apply_state(struct pwm_device *pwm,
542+
const struct pwm_state *state)
543+
{
544+
return pwm_apply_might_sleep(pwm, state);
545+
}
546+
540547
struct pwm_lookup {
541548
struct list_head list;
542549
const char *provider;

0 commit comments

Comments
 (0)