From: Thierry Reding Date: Thu, 21 Dec 2023 10:08:02 +0000 (+0100) Subject: pwm: Add pwm_apply_state() compatibility stub X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c2e64baac4f36f7e0365218c7523bb9ba4639250;p=linux.git 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 Signed-off-by: Thierry Reding --- diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 5dd665d8c909e..2a5e1154652e8 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -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;