Commit 3de5bdfb authored by Andrew Bresticker's avatar Andrew Bresticker Committed by Peter De Schrijver

clk: tegra: use max divider if divider overflows

When requesting a rate less than the minimum clock rate for a divider,
use the maximum divider value instead of bailing out with an error.
This matches the behavior of the generic clock divider.
Signed-off-by: default avatarAndrew Bresticker <abrestic@chromium.org>
parent 88b4bd70
...@@ -59,7 +59,7 @@ static int get_div(struct tegra_clk_frac_div *divider, unsigned long rate, ...@@ -59,7 +59,7 @@ static int get_div(struct tegra_clk_frac_div *divider, unsigned long rate,
return 0; return 0;
if (divider_ux1 > get_max_div(divider)) if (divider_ux1 > get_max_div(divider))
return -EINVAL; return get_max_div(divider);
return divider_ux1; return divider_ux1;
} }
......
Markdown is supported
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