]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: rcar: get clock rate only once and simplify calculation
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Thu, 12 Sep 2013 12:36:45 +0000 (14:36 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 30 Sep 2013 04:02:32 +0000 (06:02 +0200)
commite3948cf0cf7171aa33c0166b753bd62e7375c528
tree27b4c422a5c7f38b7da661648c81babec81ba9a2
parent179960d7372db2c396d6b1e5eea684057c648b9d
i2c: rcar: get clock rate only once and simplify calculation

There is no need to repeatedly query clock frequency, where it is not
expected to change. The complete loop can also trivially be replaced with
a simple division. A further loop below the one, being simplified, could
also be replaced, but that would get more complicated.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-rcar.c