mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 10:32:35 +00:00
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: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
91701ae85d
commit
2967f9ca8b
@ -433,8 +433,9 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd)
|
||||
break;
|
||||
}
|
||||
data = i2c_op(pd, OP_RX_STOP_DATA, 0);
|
||||
} else
|
||||
} else if (real_pos >= 0) {
|
||||
data = i2c_op(pd, OP_RX, 0);
|
||||
}
|
||||
|
||||
if (real_pos >= 0)
|
||||
pd->msg->buf[real_pos] = data;
|
||||
|
Loading…
Reference in New Issue
Block a user