Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4d798332 authored by Axel Lin's avatar Axel Lin Committed by Bryan Wu
Browse files

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: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
parent 5e3b7c6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment