Message ID | 88047351.0D2gRUkLKi@wasted.cogentembedded.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Headers | show |
Index: linux/drivers/i2c/busses/i2c-rcar.c =================================================================== --- linux.orig/drivers/i2c/busses/i2c-rcar.c +++ linux/drivers/i2c/busses/i2c-rcar.c @@ -432,7 +432,7 @@ static int rcar_i2c_master_xfer(struct i priv->msg = &msgs[i]; priv->pos = 0; priv->flags = 0; - if (priv->msg == &msgs[num - 1]) + if (i == num - 1) rcar_i2c_flags_set(priv, ID_LAST_MSG); ret = rcar_i2c_prepare_msg(priv);
rcar_i2c_master_xfer() needlessly compares the message pointers (using indirect addressing) in order to detect the last I2C message, while it's enough to only compare the message indexes. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- drivers/i2c/busses/i2c-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html