All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: rcar: Remove superfluous call to clk_get_rate()
@ 2019-11-13 10:14 Geert Uytterhoeven
  2019-11-13 10:52 ` Luca Ceresoli
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2019-11-13 10:14 UTC (permalink / raw)
  To: Wolfram Sang, Guennadi Liakhovetski
  Cc: linux-i2c, linux-renesas-soc, Geert Uytterhoeven

Variable "rate" already contains the current clock rate, so use that
rather than calling clk_get_rate() again.

Fixes: 8d0494037bb2af32 ("i2c: rcar: get clock rate only once and simplify calculation")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/i2c/busses/i2c-rcar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 531c01100b560be3..879f0e61a4968a08 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -317,7 +317,7 @@ static int rcar_i2c_clock_calculate(struct rcar_i2c_priv *priv, struct i2c_timin
 
 scgd_find:
 	dev_dbg(dev, "clk %d/%d(%lu), round %u, CDF:0x%x, SCGD: 0x%x\n",
-		scl, t->bus_freq_hz, clk_get_rate(priv->clk), round, cdf, scgd);
+		scl, t->bus_freq_hz, rate, round, cdf, scgd);
 
 	/* keep icccr value */
 	priv->icccr = scgd << cdf_width | cdf;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-15  7:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 10:14 [PATCH] i2c: rcar: Remove superfluous call to clk_get_rate() Geert Uytterhoeven
2019-11-13 10:52 ` Luca Ceresoli
2019-11-14  7:31 ` Niklas Söderlund
2019-11-14 20:39 ` Wolfram Sang
2019-11-15  7:53   ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.