Skip to content

Commit 1689dcd

Browse files
Guru Das Srinageshthierryreding
authored andcommitted
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 <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent fcdea6b commit 1689dcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pwm/pwm-imx27.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static void pwm_imx27_wait_fifo_slot(struct pwm_chip *chip,
202202
sr = readl(imx->mmio_base + MX3_PWMSR);
203203
fifoav = FIELD_GET(MX3_PWMSR_FIFOAV, sr);
204204
if (fifoav == MX3_PWMSR_FIFOAV_4WORDS) {
205-
period_ms = DIV_ROUND_UP(pwm_get_period(pwm),
205+
period_ms = DIV_ROUND_UP_ULL(pwm_get_period(pwm),
206206
NSEC_PER_MSEC);
207207
msleep(period_ms);
208208

0 commit comments

Comments
 (0)