summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-clps711x.c
diff options
context:
space:
mode:
authorGuru Das Srinagesh <gurus@codeaurora.org>2020-06-03 01:31:08 +0300
committerThierry Reding <thierry.reding@gmail.com>2020-06-16 12:16:08 +0300
commit5bd0b9011da836dad1a00d92ebead7eaa87f5fe3 (patch)
treebdf36c1489656d30d9e788914324e0edc5b8adca /drivers/pwm/pwm-clps711x.c
parentf3e4b14144a928c097e2d526f6dcd6ba0f5eba8a (diff)
downloadlinux-5bd0b9011da836dad1a00d92ebead7eaa87f5fe3.tar.xz
pwm: clps711x: Use 64-bit division macro
Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by using DIV64_U64_ROUND_CLOSEST to handle a 64-bit divisor. Cc: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-clps711x.c')
-rw-r--r--drivers/pwm/pwm-clps711x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-clps711x.c b/drivers/pwm/pwm-clps711x.c
index 924d39a797cf..ba9500aca078 100644
--- a/drivers/pwm/pwm-clps711x.c
+++ b/drivers/pwm/pwm-clps711x.c
@@ -43,7 +43,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->args.period);
+ return DIV64_U64_ROUND_CLOSEST(v * 0xf, pwm->args.period);
}
static int clps711x_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)