summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-crc.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2020-11-11 21:18:11 +0100
committerThierry Reding <thierry.reding@gmail.com>2020-12-17 14:18:59 +0100
commit2b1c1a5d51484f4f44d662d146e443498d0bedd2 (patch)
treeaf1909df89de7c189f4c1998f46fba31d8a6a63d /drivers/pwm/pwm-crc.c
parentpwm: sti: Remove unnecessary blank line (diff)
downloadlinux-2b1c1a5d51484f4f44d662d146e443498d0bedd2.tar.xz
linux-2b1c1a5d51484f4f44d662d146e443498d0bedd2.zip
pwm: Use -EINVAL for unsupported polarity
Instead of using a mix of -EOPNOTSUPP and -ENOTSUPP, use the more standard -EINVAL to signal that the specified polarity value was invalid. Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-crc.c')
-rw-r--r--drivers/pwm/pwm-crc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-crc.c b/drivers/pwm/pwm-crc.c
index ecfdfac0c2d9..1e2276808b7a 100644
--- a/drivers/pwm/pwm-crc.c
+++ b/drivers/pwm/pwm-crc.c
@@ -64,7 +64,7 @@ static int crc_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
}
if (state->polarity != PWM_POLARITY_NORMAL)
- return -EOPNOTSUPP;
+ return -EINVAL;
if (pwm_is_enabled(pwm) && !state->enabled) {
err = regmap_write(crc_pwm->regmap, BACKLIGHT_EN, 0);