summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-sh_mobile.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-01-17 00:05:53 +0300
committerWolfram Sang <wsa@the-dreams.de>2019-01-23 02:18:09 +0300
commit0130e3bfa9fa102252ad318d0f5608cc09822baa (patch)
treedccca5b65db909a7f9ab8ade56f616905f791260 /drivers/i2c/busses/i2c-sh_mobile.c
parente659f36d46904b5e0e860401c0454fcf6025f419 (diff)
downloadlinux-0130e3bfa9fa102252ad318d0f5608cc09822baa.tar.xz
i2c: sh_mobile: replace break; with if-block
In preparation to remove the do-while-loop. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-sh_mobile.c')
-rw-r--r--drivers/i2c/busses/i2c-sh_mobile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index ef9101cde29f..ab6969ed7eff 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -394,11 +394,10 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd)
break;
}
- if (real_pos < 0) {
+ if (real_pos < 0)
i2c_op(pd, OP_RX_STOP);
- break;
- }
- data = i2c_op(pd, OP_RX_STOP_DATA);
+ else
+ data = i2c_op(pd, OP_RX_STOP_DATA);
} else if (real_pos >= 0) {
data = i2c_op(pd, OP_RX);
}