summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-atmel.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2019-10-04 16:32:06 +0300
committerThierry Reding <thierry.reding@gmail.com>2020-01-08 15:35:12 +0300
commit3c64ed74d619c25c65abb1fcafcb1aff835867d5 (patch)
treeae8772eeac8e186dbc916dcfef04a2fae3fc77b1 /drivers/pwm/pwm-atmel.c
parent366486e0afaa115ec456db124fc07d824a1c1fb1 (diff)
downloadlinux-3c64ed74d619c25c65abb1fcafcb1aff835867d5.tar.xz
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 <linux@rasmusvillemoes.dk> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
0 files changed, 0 insertions, 0 deletions