clk: pwm: Use 64-bit division function
Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by using div64_u64() to handle a 64-bit divisor. Also ensure that divide-by-zero (with fixed_rate as denominator) does not happen with an explicit check with probe failure as a consequence. Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Showing
Please register or sign in to comment