Re: [PATCH v11 09/12] pwm: sun4i: Use 64-bit division function
From: Arnd Bergmann
Date: Fri Mar 20 2020 - 13:03:11 EST
On Fri, Mar 20, 2020 at 2:42 AM Guru Das Srinagesh <gurus@xxxxxxxxxxxxxx> wrote:
> sun4i_pwm->next_period[pwm->hwpwm] = jiffies +
> - usecs_to_jiffies(cstate.period / 1000 + 1);
> + usecs_to_jiffies(div_u64(cstate.period, 1000) + 1);
> sun4i_pwm->needs_delay[pwm->hwpwm] = true;
>
This one looks like it should use nsecs_to_jiffies(cstate.period) to avoid
having two 64-bit divisions.
Arnd