Skip to content
Commit 41fa8f57 authored by Philipp Zabel's avatar Philipp Zabel Committed by Thierry Reding
Browse files

pwm: stm32: Use hweight32 in stm32_pwm_detect_channels



Use hweight32() to count the CCxE bits in stm32_pwm_detect_channels().
Since the return value is assigned to chip.npwm, change it to unsigned
int as well.

Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarFabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent c0504f59
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment