clk: vt8500: Remove unnecessary divisor adjustment in vtwm_dclk_set_rate()
authorTony Prisk <linux@prisktech.co.nz>
Mon, 13 May 2013 08:21:00 +0000 (20:21 +1200)
committerMike Turquette <mturquette@linaro.org>
Wed, 29 May 2013 21:47:17 +0000 (14:47 -0700)
commit65f2c58f0f44403aa64eccc14f3a0a74d721fe7e
tree37b8ac6bb648af43d283538608aa7b7a26738bc5
parent518d4709f1961539a64f5d5f9b5b842824c0d971
clk: vt8500: Remove unnecessary divisor adjustment in vtwm_dclk_set_rate()

The divisor adjustment code to ensure that a divisor is not rounded down,
thereby giving a rate higher than requested, is unnecessary and in some
instances results in the actual rate being much lower than requested due to
rounding errors.

The test is already performed in vtwm_dclk_round_rate(), which is always
called when clk_set_rate is called. Due to rounding errors in the line:
divisor = parent_rate / rate (clk-vt8500.c:160) we will sometimes end up
adjusting the divisor twice - first in round_rate and then again in set_rate.

This patch removes the test/adjustment in vtwm_dclk_set_rate.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk-vt8500.c