Commit 5b3e3b43 authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang
Browse files

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 81d696c7
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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);
			break;
		}