summaryrefslogtreecommitdiffstats
path: root/arch/mips/loongson
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2014-11-10 09:05:43 +0100
committerChris Zankel <chris@zankel.net>2014-11-10 09:05:43 +0100
commitaeb589734251aaf4c28d80d0efb5da01dc0ce868 (patch)
treeea1ee0a54d4c24221a1e80cd07e899f8b34a6920 /arch/mips/loongson
parentMerge tag 'xtensa-for-next-20141021-1' of git://github.com/jcmvbkbc/linux-xte... (diff)
parentLinux 3.18-rc4 (diff)
downloadlinux-aeb589734251aaf4c28d80d0efb5da01dc0ce868.tar.xz
linux-aeb589734251aaf4c28d80d0efb5da01dc0ce868.zip
Merge tag 'v3.18-rc4' into for_next
Linux 3.18-rc4
Diffstat (limited to 'arch/mips/loongson')
-rw-r--r--arch/mips/loongson/lemote-2f/clock.c5
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;