summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-clps711x.c
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2019-12-19 00:14:33 -0300
committerGitHub <noreply@github.com>2019-12-19 00:14:33 -0300
commitfa8a03bec68d9ef89da72277bd3501ed3daa6217 (patch)
tree3d3218332bcb34cb0afa01d6ad996058a3dbcb77 /drivers/pwm/pwm-clps711x.c
parent6b774eec1f9d3064e9b33634dfa99d5666d0a73a (diff)
parent1ddf624b0b268fdc0b80b1de618b98f8d117afea (diff)
Merge pull request #55 from toradex/4.14-2.0.x-imx
4.14 2.0.x imx
Diffstat (limited to 'drivers/pwm/pwm-clps711x.c')
-rw-r--r--drivers/pwm/pwm-clps711x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-clps711x.c b/drivers/pwm/pwm-clps711x.c
index 26ec24e457b1..7e16b7def0dc 100644
--- a/drivers/pwm/pwm-clps711x.c
+++ b/drivers/pwm/pwm-clps711x.c
@@ -48,7 +48,7 @@ static void clps711x_pwm_update_val(struct clps711x_chip *priv, u32 n, u32 v)
static unsigned int clps711x_get_duty(struct pwm_device *pwm, unsigned int v)
{
/* Duty cycle 0..15 max */
- return DIV_ROUND_CLOSEST(v * 0xf, pwm_get_period(pwm));
+ return DIV_ROUND_CLOSEST(v * 0xf, pwm->args.period);
}
static int clps711x_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
@@ -71,7 +71,7 @@ static int clps711x_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
struct clps711x_chip *priv = to_clps711x_chip(chip);
unsigned int duty;
- if (period_ns != pwm_get_period(pwm))
+ if (period_ns != pwm->args.period)
return -EINVAL;
duty = clps711x_get_duty(pwm, duty_ns);