aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk/spear/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/spear/clk.c')
-rw-r--r--drivers/clk/spear/clk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/clk/spear/clk.c b/drivers/clk/spear/clk.c
index 376d4e5ff32..628b6d5ed3d 100644
--- a/drivers/clk/spear/clk.c
+++ b/drivers/clk/spear/clk.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.kumar@st.com>
+ * Viresh Kumar <viresh.linux@gmail.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
@@ -32,5 +32,8 @@ long clk_round_rate_index(struct clk_hw *hw, unsigned long drate,
}
}
+ if ((*index) == rtbl_cnt)
+ (*index)--;
+
return rate;
}