]> Git Repo - linux.git/commitdiff
pwm: imx27: Use 64-bit division macro
authorGuru Das Srinagesh <[email protected]>
Tue, 2 Jun 2020 22:31:11 +0000 (15:31 -0700)
committerThierry Reding <[email protected]>
Tue, 16 Jun 2020 09:16:08 +0000 (11:16 +0200)
Since the PWM framework is switching struct pwm_state.period's
datatype to u64, prepare for this transition by using
DIV_ROUND_UP_ULL to handle a 64-bit dividend.

Signed-off-by: Guru Das Srinagesh <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
drivers/pwm/pwm-imx27.c

index 732a6f3701e8e329d3e362a5c3355baa24cfb7f7..c50d453552bd4f3a01d35c4445ba2272618cb286 100644 (file)
@@ -202,7 +202,7 @@ static void pwm_imx27_wait_fifo_slot(struct pwm_chip *chip,
        sr = readl(imx->mmio_base + MX3_PWMSR);
        fifoav = FIELD_GET(MX3_PWMSR_FIFOAV, sr);
        if (fifoav == MX3_PWMSR_FIFOAV_4WORDS) {
-               period_ms = DIV_ROUND_UP(pwm_get_period(pwm),
+               period_ms = DIV_ROUND_UP_ULL(pwm_get_period(pwm),
                                         NSEC_PER_MSEC);
                msleep(period_ms);
 
This page took 0.054911 seconds and 4 git commands to generate.