aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2024-01-08 09:33:59 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2024-01-08 09:33:59 +1100
commit2c222a9bcd3a2b6dc80d2e104e963c36280b395a (patch)
tree63ba6e18a47f3623c5281421e8a1f806eb016eb8
parent7e49687ac05dd86451f8413cc1376caa50a83954 (diff)
parentd4d29dd858bb1cb78d2848d6742ade3c0421ce49 (diff)
downloadlinux-next-2c222a9bcd3a2b6dc80d2e104e963c36280b395a.tar.gz
Merge branch 'sunxi/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git
-rw-r--r--drivers/clk/sunxi-ng/ccu_nkm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/clk/sunxi-ng/ccu_nkm.c b/drivers/clk/sunxi-ng/ccu_nkm.c
index eed64547ad42ff..853f84398e2bdb 100644
--- a/drivers/clk/sunxi-ng/ccu_nkm.c
+++ b/drivers/clk/sunxi-ng/ccu_nkm.c
@@ -21,17 +21,16 @@ static unsigned long ccu_nkm_find_best_with_parent_adj(struct ccu_common *common
unsigned long *parent, unsigned long rate,
struct _ccu_nkm *nkm)
{
- unsigned long best_rate = 0, best_parent_rate = *parent, tmp_parent = *parent;
+ unsigned long best_rate = 0, best_parent_rate = *parent;
unsigned long best_n = 0, best_k = 0, best_m = 0;
unsigned long _n, _k, _m;
for (_k = nkm->min_k; _k <= nkm->max_k; _k++) {
for (_n = nkm->min_n; _n <= nkm->max_n; _n++) {
for (_m = nkm->min_m; _m <= nkm->max_m; _m++) {
- unsigned long tmp_rate;
+ unsigned long tmp_rate, tmp_parent;
tmp_parent = clk_hw_round_rate(parent_hw, rate * _m / (_n * _k));
-
tmp_rate = tmp_parent * _n * _k / _m;
if (ccu_is_better_rate(common, rate, tmp_rate, best_rate) ||