clk: renesas: rcar-gen3-cpg: Refactor checks for accessing the div table
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 18 Jul 2017 16:44:07 +0000 (18:44 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 19 Jul 2017 16:06:15 +0000 (18:06 +0200)
commit2d6f25774332ebf6a0283d5bc558b273991797db
tree5519dba6e63e64557c6683c648eb8bae1055ca0a
parentf317880c5b2bd9c2f3abcd1f799b17b922ac944f
clk: renesas: rcar-gen3-cpg: Refactor checks for accessing the div table

Do the checks for accessing the SD divider table only when the rate gets
updated, namely on init and set_rate. In all other cases, reuse the last
value. This simplifies code, runtime load, and error reporting.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/clk/renesas/rcar-gen3-cpg.c