summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk_test.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-02-25 15:35:27 +0100
committerStephen Boyd <sboyd@kernel.org>2022-03-11 19:14:40 -0800
commita9b269310ad9abb2f206fe814fd3afcadddce3aa (patch)
tree81fddac32910fd317a01d8f12585ae0157c2af20 /drivers/clk/clk_test.c
parent948fb0969eae856f9b65d8c9b98042afed08454f (diff)
downloadlinux-a9b269310ad9abb2f206fe814fd3afcadddce3aa.tar.gz
linux-a9b269310ad9abb2f206fe814fd3afcadddce3aa.tar.bz2
linux-a9b269310ad9abb2f206fe814fd3afcadddce3aa.zip
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: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220225143534.405820-6-maxime@cerno.tech Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/clk_test.c')
0 files changed, 0 insertions, 0 deletions