summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2014-09-15 00:15:46 +0400
committerWolfram Sang <wsa@the-dreams.de>2014-09-29 22:41:17 +0200
commit7c7117ffe08fd54d4129e378b46a812c717bae48 (patch)
tree8fb95258096ceb464b88e2af45b7bfde1d52e9c5 /drivers/i2c/busses
parentc30d7662d81062cbc25e5ff50be8dbaca3a1f20a (diff)
downloadlinux-7c7117ffe08fd54d4129e378b46a812c717bae48.tar.bz2
i2c: rcar: make rcar_i2c_prepare_msg() *void*
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> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-rcar.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 98125fb0f3fe..c49b33e99d68 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -245,7 +245,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);
@@ -253,8 +253,6 @@ static int rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv)
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;
}
/*
@@ -456,14 +454,11 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
if (i == num - 1)
rcar_i2c_flags_set(priv, ID_LAST_MSG);
- ret = rcar_i2c_prepare_msg(priv);
+ rcar_i2c_prepare_msg(priv);
spin_unlock_irqrestore(&priv->lock, flags);
/*-------------- spin unlock -----------------*/
- if (ret < 0)
- break;
-
timeout = wait_event_timeout(priv->wait,
rcar_i2c_flags_has(priv, ID_DONE),
5 * HZ);