From: 陈亮 Date: Mon, 26 May 2014 02:36:50 +0000 (-0700) Subject: dvfs: avoid round a rate two times since it may cause round wrong value at second... X-Git-Tag: firefly_0821_release~5231 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=436456dfb06023ce3b18b15ef28cfc0becebb735;p=firefly-linux-kernel-4.4.55.git dvfs: avoid round a rate two times since it may cause round wrong value at second time --- diff --git a/arch/arm/mach-rockchip/dvfs.c b/arch/arm/mach-rockchip/dvfs.c index e2922a141d21..3919faf0f973 100644 --- a/arch/arm/mach-rockchip/dvfs.c +++ b/arch/arm/mach-rockchip/dvfs.c @@ -895,9 +895,9 @@ static int dvfs_target(struct dvfs_node *clk_dvfs_node, unsigned long rate) /* scale rate */ if (clk_dvfs_node->clk_dvfs_target) { - ret = clk_dvfs_node->clk_dvfs_target(clk, new_rate); + ret = clk_dvfs_node->clk_dvfs_target(clk, rate); } else { - ret = clk_set_rate(clk, new_rate); + ret = clk_set_rate(clk, rate); } if (ret) {