aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-09-12 08:36:48 -0400
committerWolfram Sang <wsa@the-dreams.de>2013-09-30 00:02:32 -0400
commit991e7ecf1f1a2e2fa76387066342a5a6c4a28a76 (patch)
tree41cbdf4dde864694ffeddce17328477c09713fed /drivers/i2c
parent330c824a49cd49dd7e61c1e397fa4e7380ba2c68 (diff)
i2c: rcar: use per-device clock
Using the same clock for all device instances is non-portable and obtaining clock references by an ID without using a device pointer is discouraged. This is also not needed, because on platforms, where this driver is used, suitable clocks are available for the I2C controllers, that are children of the peripheral clock and just pass its rate 1-to-1 to controllers. This patch switches the driver to obtain references to correct clocks. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-rcar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 98276eb5f6e7..8603f5e805aa 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -227,7 +227,7 @@ static int rcar_i2c_clock_calculate(struct rcar_i2c_priv *priv,
227 u32 bus_speed, 227 u32 bus_speed,
228 struct device *dev) 228 struct device *dev)
229{ 229{
230 struct clk *clkp = clk_get(NULL, "peripheral_clk"); 230 struct clk *clkp = clk_get(dev, NULL);
231 u32 scgd, cdf; 231 u32 scgd, cdf;
232 u32 round, ick; 232 u32 round, ick;
233 u32 scl; 233 u32 scl;