mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
i2c: sh_mobile: simplify sending address for RX
pd->pos won't be smaller than -1, so we can simplify the logic. 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>
This commit is contained in:
parent
81d696c7c4
commit
5b3e3b43b0
@ -392,13 +392,9 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd)
|
||||
int real_pos;
|
||||
|
||||
do {
|
||||
if (pd->pos <= -1) {
|
||||
if (sh_mobile_i2c_is_first_byte(pd)) {
|
||||
sh_mobile_i2c_get_data(pd, &data);
|
||||
|
||||
if (sh_mobile_i2c_is_first_byte(pd))
|
||||
i2c_op(pd, OP_TX_FIRST, data);
|
||||
else
|
||||
i2c_op(pd, OP_TX, data);
|
||||
i2c_op(pd, OP_TX_FIRST, data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user