diff options
author | Jens Axboe <axboe@fb.com> | 2014-11-18 19:43:46 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-11-18 19:43:46 -0700 |
commit | b3521729769ec71567a2e32a38609f87e781e41b (patch) | |
tree | 66a8494968706420c3eb043caa5868702d440d18 /arch/mips/loongson/lemote-2f/clock.c | |
parent | 139768895309c6c1d6913e909e9c9422f81a1640 (diff) | |
parent | fc14f9c1272f62c3e8d01300f52467c0d9af50f9 (diff) | |
download | linux-b3521729769ec71567a2e32a38609f87e781e41b.tar.gz linux-b3521729769ec71567a2e32a38609f87e781e41b.tar.bz2 linux-b3521729769ec71567a2e32a38609f87e781e41b.zip |
Merge branch 'master' into for-3.19/drivers
Diffstat (limited to 'arch/mips/loongson/lemote-2f/clock.c')
-rw-r--r-- | arch/mips/loongson/lemote-2f/clock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/loongson/lemote-2f/clock.c b/arch/mips/loongson/lemote-2f/clock.c index a217061beee3..462e34d46b4a 100644 --- a/arch/mips/loongson/lemote-2f/clock.c +++ b/arch/mips/loongson/lemote-2f/clock.c @@ -91,6 +91,7 @@ EXPORT_SYMBOL(clk_put); int clk_set_rate(struct clk *clk, unsigned long rate) { + unsigned int rate_khz = rate / 1000; struct cpufreq_frequency_table *pos; int ret = 0; int regval; @@ -107,9 +108,9 @@ int clk_set_rate(struct clk *clk, unsigned long rate) propagate_rate(clk); cpufreq_for_each_valid_entry(pos, loongson2_clockmod_table) - if (rate == pos->frequency) + if (rate_khz == pos->frequency) break; - if (rate != pos->frequency) + if (rate_khz != pos->frequency) return -ENOTSUPP; clk->rate = rate; |