diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-01-10 23:03:38 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-02-01 20:47:06 -0500 |
commit | 4d7983324507ff23ddf0b6e513864d4eca7a62f1 (patch) | |
tree | 93c8614f514fedca1e8742e17e02e2efd9dd8cf5 /drivers/leds/leds-regulator.c | |
parent | 5e3b7c6b1cb1a579a65fa77c7f785d94013025be (diff) |
leds: renesas-tpu: Improve the readability to pick the lowest acceptable rate
I spent a few minutes to understand why the code catching the mismatch case
by checking if k is 0 or not. And the code using "k - 1" as array index is
unusual.
This patch checks acceptable rate from the lowest rate, and then we don't need
to subtract k by 1. This change improves the readability.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-regulator.c')
0 files changed, 0 insertions, 0 deletions