Commit 2967f9ca authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang

i2c: sh_mobile: avoid unnecessary register read

There is no data when the first WAIT interrupt arrives. No need to read
something then.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 91701ae8
...@@ -433,8 +433,9 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd) ...@@ -433,8 +433,9 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd)
break; break;
} }
data = i2c_op(pd, OP_RX_STOP_DATA, 0); data = i2c_op(pd, OP_RX_STOP_DATA, 0);
} else } else if (real_pos >= 0) {
data = i2c_op(pd, OP_RX, 0); data = i2c_op(pd, OP_RX, 0);
}
if (real_pos >= 0) if (real_pos >= 0)
pd->msg->buf[real_pos] = data; pd->msg->buf[real_pos] = data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment