diff options
author | Guru Das Srinagesh <gurus@codeaurora.org> | 2020-06-02 15:31:11 -0700 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-06-16 11:16:08 +0200 |
commit | 1689dcd433aaa0d32dec3fdb4bd166a0d38f4bbf (patch) | |
tree | 64a34de0c30c45294c8f827b2cfe3e0fc94bcf6a /drivers/pwm | |
parent | fcdea6b2a3f6508618e39e061073a18c55993a1b (diff) | |
download | linux-stable-1689dcd433aaa0d32dec3fdb4bd166a0d38f4bbf.tar.gz linux-stable-1689dcd433aaa0d32dec3fdb4bd166a0d38f4bbf.tar.bz2 linux-stable-1689dcd433aaa0d32dec3fdb4bd166a0d38f4bbf.zip |
pwm: imx27: Use 64-bit division macro
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 <gurus@codeaurora.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-imx27.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c index 732a6f3701e8..c50d453552bd 100644 --- a/drivers/pwm/pwm-imx27.c +++ b/drivers/pwm/pwm-imx27.c @@ -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); |