From: Geert Uytterhoeven Date: Wed, 13 Nov 2019 10:14:53 +0000 (+0100) Subject: i2c: rcar: Remove superfluous call to clk_get_rate() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c39511ffb99b14541dc7c82da0accc14266c9100;p=linux.git i2c: rcar: Remove superfluous call to clk_get_rate() Variable "rate" already contains the current clock rate, so use that rather than calling clk_get_rate() again. Signed-off-by: Geert Uytterhoeven Reviewed-by: Luca Ceresoli Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index 531c01100b560..879f0e61a4968 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;