diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-09-14 16:15:46 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-09-29 16:41:17 -0400 |
commit | 7c7117ffe08fd54d4129e378b46a812c717bae48 (patch) | |
tree | 8fb95258096ceb464b88e2af45b7bfde1d52e9c5 /drivers/i2c | |
parent | c30d7662d81062cbc25e5ff50be8dbaca3a1f20a (diff) |
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')
-rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 9 |
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: | |||
245 | return 0; | 245 | return 0; |
246 | } | 246 | } |
247 | 247 | ||
248 | static int rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv) | 248 | static void rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv) |
249 | { | 249 | { |
250 | int read = !!rcar_i2c_is_recv(priv); | 250 | int read = !!rcar_i2c_is_recv(priv); |
251 | 251 | ||
@@ -253,8 +253,6 @@ static int rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv) | |||
253 | rcar_i2c_write(priv, ICMSR, 0); | 253 | rcar_i2c_write(priv, ICMSR, 0); |
254 | rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START); | 254 | rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START); |
255 | rcar_i2c_write(priv, ICMIER, read ? RCAR_IRQ_RECV : RCAR_IRQ_SEND); | 255 | rcar_i2c_write(priv, ICMIER, read ? RCAR_IRQ_RECV : RCAR_IRQ_SEND); |
256 | |||
257 | return 0; | ||
258 | } | 256 | } |
259 | 257 | ||
260 | /* | 258 | /* |
@@ -456,14 +454,11 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, | |||
456 | if (i == num - 1) | 454 | if (i == num - 1) |
457 | rcar_i2c_flags_set(priv, ID_LAST_MSG); | 455 | rcar_i2c_flags_set(priv, ID_LAST_MSG); |
458 | 456 | ||
459 | ret = rcar_i2c_prepare_msg(priv); | 457 | rcar_i2c_prepare_msg(priv); |
460 | 458 | ||
461 | spin_unlock_irqrestore(&priv->lock, flags); | 459 | spin_unlock_irqrestore(&priv->lock, flags); |
462 | /*-------------- spin unlock -----------------*/ | 460 | /*-------------- spin unlock -----------------*/ |
463 | 461 | ||
464 | if (ret < 0) | ||
465 | break; | ||
466 | |||
467 | timeout = wait_event_timeout(priv->wait, | 462 | timeout = wait_event_timeout(priv->wait, |
468 | rcar_i2c_flags_has(priv, ID_DONE), | 463 | rcar_i2c_flags_has(priv, ID_DONE), |
469 | 5 * HZ); | 464 | 5 * HZ); |