===================================================================
@@ -243,7 +243,7 @@ scgd_find:
return 0;
}
-static int rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv)
+static void rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv)
{
int read = !!rcar_i2c_is_recv(priv);
@@ -251,8 +251,6 @@ static int rcar_i2c_prepare_msg(struct r
rcar_i2c_write(priv, ICMSR, 0);
rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START);
rcar_i2c_write(priv, ICMIER, read ? RCAR_IRQ_RECV : RCAR_IRQ_SEND);
-
- return 0;
}
/*
@@ -435,10 +433,7 @@ static int rcar_i2c_master_xfer(struct i
if (i == num - 1)
rcar_i2c_flags_set(priv, ID_LAST_MSG);
- ret = rcar_i2c_prepare_msg(priv);
-
- if (ret < 0)
- break;
+ rcar_i2c_prepare_msg(priv);
timeout = wait_event_timeout(priv->wait,
rcar_i2c_flags_has(priv, ID_DONE),
rcar_i2c_prepare_msg() always returns 0, so we can make this function return *void* and thus remove the result check in rcar_i2c_master_xfer(). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- drivers/i2c/busses/i2c-rcar.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- 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