]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: rockchip: Simplify rockchip_pwm_get_state()
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 19 Sep 2019 09:17:27 +0000 (11:17 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Tue, 2 Jun 2020 13:50:52 +0000 (15:50 +0200)
commite1690810b7a6c9a1d424db0dad5fdf8c90c4333f
treeac579132529a0c2e1ec5f374edbd412f012788b2
parentf91194ab59c0dd3684079a8f73d14c0d458f6878
pwm: rockchip: Simplify rockchip_pwm_get_state()

The way state->enabled is computed is rather convoluted and hard to
read - both branches of the if() actually do the exact same thing. So
remove the if(), and further simplify "<boolean condition> ? true :
false" to "<boolean condition>".

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-rockchip.c