]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: stm32: Remove clutter from ternary operator
authorThierry Reding <thierry.reding@gmail.com>
Wed, 16 Oct 2019 10:42:40 +0000 (12:42 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 21 Oct 2019 14:50:05 +0000 (16:50 +0200)
commit688ef7d62a6c057bd37b5b28c05e84a5f977dc14
treed4a58ab4b9cff038de6ce48a1fe65551b15f2cbb
parentf29c1e7a6eee802007e9a1f1f09f866c7cd2b600
pwm: stm32: Remove clutter from ternary operator

Remove usage of the ternary operator to assign values for register
fields. Instead, parameterize the register and field offset macros
and pass the index to them.

This removes clutter and improves readability.

Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-stm32.c
include/linux/mfd/stm32-timers.h