summaryrefslogtreecommitdiff
path: root/arch/mips/loongson/lemote-2f/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/loongson/lemote-2f/clock.c')
-rw-r--r--arch/mips/loongson/lemote-2f/clock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/loongson/lemote-2f/clock.c b/arch/mips/loongson/lemote-2f/clock.c
index bc739d4bab2e..4dc2f5fa3f67 100644
--- a/arch/mips/loongson/lemote-2f/clock.c
+++ b/arch/mips/loongson/lemote-2f/clock.c
@@ -121,7 +121,8 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
clk->rate = rate;
regval = LOONGSON_CHIPCFG0;
- regval = (regval & ~0x7) | (loongson2_clockmod_table[i].index - 1);
+ regval = (regval & ~0x7) |
+ (loongson2_clockmod_table[i].driver_data - 1);
LOONGSON_CHIPCFG0 = regval;
return ret;