ramips: fix wrong i2s clock unit from kHz to MHz

clk_get_rate returns the current clock rate in Hz for a clock source so
if we divide it by 1M, then we get frequency in MHz and not kHz.

Signed-off-by: Qin Wei <support@vocore.io>
[added missing commit message, and fixed author with SoB from PR message]
Signed-off-by: Petr Štetiar <ynezz@true.cz>

Signed-off-by: Petr Štetiar <ynezz@true.cz>
openwrt-19.07
Qin Wei 2019-03-05 09:58:55 +08:00 committed by Petr Štetiar
parent 503edc913b
commit 5f40b519f3
1 changed files with 1 additions and 1 deletions

View File

@ -1007,7 +1007,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ if (ret)
+ goto err_debugfs;
+
+ dev_info(i2s->dev, "mclk %luKHz\n", clk_get_rate(i2s->clk) / 1000000);
+ dev_info(i2s->dev, "mclk %luMHz\n", clk_get_rate(i2s->clk) / 1000000);
+
+ return 0;
+