diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2023-12-21 11:08:02 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2024-01-05 09:33:10 +0100 |
commit | c2e64baac4f36f7e0365218c7523bb9ba4639250 (patch) | |
tree | ce5b99a1a8f36781c7701bb02168dccbca4828e7 /include/linux/pwm.h | |
parent | 881791886bfa8e353c3203f95bfbaaeee25d2d50 (diff) |
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>
Diffstat (limited to 'include/linux/pwm.h')
-rw-r--r-- | include/linux/pwm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 5dd665d8c909..2a5e1154652e 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; |