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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
Thierry Reding
2023-12-21 11:08:02 +01:00
parent 881791886b
commit c2e64baac4

View File

@@ -537,6 +537,13 @@ static inline void pwm_apply_args(struct pwm_device *pwm)
pwm_apply_might_sleep(pwm, &state);
}
/* only for backwards-compatibility, new code should not use this */
static inline int pwm_apply_state(struct pwm_device *pwm,
const struct pwm_state *state)
{
return pwm_apply_might_sleep(pwm, state);
}
struct pwm_lookup {
struct list_head list;
const char *provider;