Skip to content
Commit a9b26931 authored by Maxime Ripard's avatar Maxime Ripard Committed by Stephen Boyd
Browse files

clk: Use clamp instead of open-coding our own



The code in clk_set_rate_range() will, if the current rate is outside of
the new range, force it to the minimum or maximum.

Since it's running under the condition that the rate is either lower
than the minimum, or higher than the maximum, this is equivalent to
using clamp, while being less readable. Let's switch to using clamp
instead.

Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220225143534.405820-6-maxime@cerno.tech


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 948fb096
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