]> git.baikalelectronics.ru Git - kernel.git/commit
clk: rockchip: protect register macros against multipart values
authorHeiko Stuebner <heiko@sntech.de>
Thu, 18 Jun 2015 14:18:30 +0000 (16:18 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Mon, 6 Jul 2015 22:03:24 +0000 (15:03 -0700)
commit8d383d7ac241a1600362dda9b80c4f50946b955b
tree2d9fdad1d9815069d31d8c337754af470f0ccbae
parent1d3f2c71acd99cdc6225b6f2a08926a671560ce4
clk: rockchip: protect register macros against multipart values

The macros calculate the correct offset from the id in the parameter.
If this parameter does not consist of a single number, the calculation
will return wrong registers in the best case or create unaligned accesses
in the worst case. So protect the calculations against such values.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/rockchip/clk.h