mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
pwm: Return -EINVAL for old-style drivers without .set_polarity callback
Since commit 2b1c1a5d51
("pwm: Use -EINVAL for unsupported polarity")
all drivers implementing the apply callback are unified to return
-EINVAL if an unsupported polarity is requested. Do the same in the
compat code for old-style drivers.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
f9a8ee8c8b
commit
d58cb0ee51
1 changed files with 1 additions and 1 deletions
|
@ -596,7 +596,7 @@ int pwm_apply_state(struct pwm_device *pwm, const struct pwm_state *state)
|
|||
*/
|
||||
if (state->polarity != pwm->state.polarity) {
|
||||
if (!chip->ops->set_polarity)
|
||||
return -ENOTSUPP;
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Changing the polarity of a running PWM is
|
||||
|
|
Loading…
Reference in a new issue