aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorAndrew Bresticker <abrestic@chromium.org>2013-12-26 16:44:27 -0800
committerPeter De Schrijver <pdeschrijver@nvidia.com>2014-02-17 16:18:34 +0200
commit3de5bdfb4cb3bd99052a4ffaee358189779be042 (patch)
tree0ca23dade9b01c0f5ff3c1d6101e1533f401e5fa /drivers/clk
parent88b4bd7071ac06e321b4bf4bdb8c69db40182c5a (diff)
downloadlinux-stericsson-3de5bdfb4cb3bd99052a4ffaee358189779be042.tar.gz
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: Andrew Bresticker <abrestic@chromium.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/tegra/clk-divider.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divider.c
index 4d75b1f37e3a..290f9c1a3749 100644
--- a/drivers/clk/tegra/clk-divider.c
+++ b/drivers/clk/tegra/clk-divider.c
@@ -59,7 +59,7 @@ static int get_div(struct tegra_clk_frac_div *divider, unsigned long rate,
return 0;
if (divider_ux1 > get_max_div(divider))
- return -EINVAL;
+ return get_max_div(divider);
return divider_ux1;
}