Skip to content

Commit 4cbeffc

Browse files
ukleinekUwe Kleine-König
authored andcommitted
pwm: stm32: Don't open-code TIM_CCER_CCxE()
Instead of manually calculating the offset of the channels CCxE bit, make use of the TIM_CCER_CCxE macro. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/7803f63b1310ddbd706f51f2f42d30b6dd786b03.1743844730.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 461d68d commit 4cbeffc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pwm/pwm-stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static int stm32_pwm_round_waveform_tohw(struct pwm_chip *chip,
8888

8989
rate = clk_get_rate(priv->clk);
9090

91-
if (active_channels(priv) & ~(1 << ch * 4)) {
91+
if (active_channels(priv) & ~TIM_CCER_CCxE(ch + 1)) {
9292
u64 arr;
9393

9494
/*

0 commit comments

Comments
 (0)