aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-atmel.c
diff options
context:
space:
mode:
authorRasmus Villemoes <[email protected]>2019-10-04 13:32:06 +0000
committerThierry Reding <[email protected]>2020-01-08 12:35:12 +0000
commit3c64ed74d619c25c65abb1fcafcb1aff835867d5 (patch)
treeae8772eeac8e186dbc916dcfef04a2fae3fc77b1 /drivers/pwm/pwm-atmel.c
parentdt-bindings: pwm: mxs-pwm: Increase #pwm-cells (diff)
downloadkernel-3c64ed74d619c25c65abb1fcafcb1aff835867d5.tar.gz
kernel-3c64ed74d619c25c65abb1fcafcb1aff835867d5.zip
pwm: mxs: Avoid a division in mxs_pwm_apply()
Since the divisor is not a compile-time constant (unless gcc somehow decided to unroll the loop PERIOD_CDIV_MAX times), this does a somewhat expensive 32/32 division. Replace that with a right shift. We still have a 64/32 division just below, but at least in that case the divisor is compile-time constant. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
0 files changed, 0 insertions, 0 deletions