diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-01-16 22:05:53 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-01-23 00:18:09 +0100 |
commit | 0130e3bfa9fa102252ad318d0f5608cc09822baa (patch) | |
tree | dccca5b65db909a7f9ab8ade56f616905f791260 /drivers/i2c/busses/i2c-sh_mobile.c | |
parent | i2c: sh_mobile: remove is_first_byte function (diff) | |
download | linux-0130e3bfa9fa102252ad318d0f5608cc09822baa.tar.xz linux-0130e3bfa9fa102252ad318d0f5608cc09822baa.zip |
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.c | 7 |
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); } |